/* Vision Academy Nepal — inner pages (matches index.html theme) */
:root {
  --sd-blue: #1d4ed8;
  --sd-blue-dark: #1a3a8f;
  --sd-blue-deep: #1e40af;
  --sd-orange: #f97316;
  --sd-orange-dark: #ea580c;
  --sd-bg: #e8edf2;
  --sd-card: #ffffff;
  --sd-ink: #111827;
  --sd-muted: #6b7280;
  --sd-border: #e5e7eb;
  --sd-ivory: #f0f4ff;
  --sd-max: 1280px;
}

.site-main-wrap { min-height: 50vh; margin: 0 !important; padding: 0 !important; }
.site-main-wrap > *:first-child { margin-top: 0 !important; padding-top: 0 !important; }
/* Style tags injected inline (e.g. in gallery.php, video.php) become the first child
   of site-main-wrap, so we must also zero out the first non-style element. */
.site-main-wrap > style:first-child + * { margin-top: 0 !important; padding-top: 0 !important; }
.site-main-wrap > style + style + * { margin-top: 0 !important; padding-top: 0 !important; }

/* Hard reset — kill any top gap before page content on all inner pages */
html, body {
  margin-top: 0 !important;
  padding-top: 0 !important;
}
body > *:not(#wpadminbar) {
  margin-top: 0 !important;
}
#main, main {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* Page header */
.sd-page-header {
  position: relative;
  overflow: hidden;
  background: linear-gradient(90deg, var(--sd-blue-dark) 0%, var(--sd-blue) 55%, #2563eb 100%);
  border-bottom: 3px solid var(--sd-orange);
  padding: 0;
  margin: 0;
  margin-top: 0 !important;
}
.sd-page-header__pattern {
  position: absolute;
  right: -4rem;
  top: -3rem;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.12) 0%, transparent 70%);
  pointer-events: none;
}
.sd-page-header__inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  min-height: clamp(72px, 10vw, 100px);
  padding: clamp(14px, 2.5vw, 22px) 0;
}
.sd-breadcrumb {
  font-size: clamp(0.65rem, 1.2vw, 0.75rem);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #bfdbfe;
  margin-bottom: 0.5rem;
}
.sd-breadcrumb a {
  color: #e0eaff;
  text-decoration: none;
  transition: color 0.15s;
}
.sd-breadcrumb a:hover { color: #fff; }
.sd-breadcrumb__sep { margin: 0 0.35rem; opacity: 0.7; }
.sd-breadcrumb__current { color: #fde68a; }
.sd-page-title {
  font-family: 'Poppins', 'Noto Sans Devanagari', sans-serif;
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  font-weight: 800;
  color: #fff;
  margin: 0;
  line-height: 1.2;
}

.sd-section {
  padding: clamp(1.5rem, 3vw, 2.5rem) 0 clamp(2.5rem, 5vw, 4rem);
  background: var(--sd-bg);
}

/* When .sd-section immediately follows the page-header, no extra top gap */
.sd-page-header + .sd-section,
.sd-page-header + * .sd-section:first-child {
  padding-top: clamp(1.25rem, 2.5vw, 2rem);
}

/* Filter pills */
.sd-filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: clamp(1.25rem, 3vw, 2rem);
}
.sd-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.4rem 1rem;
  border-radius: 999px;
  font-size: clamp(0.72rem, 1.2vw, 0.85rem);
  font-weight: 600;
  text-decoration: none;
  color: var(--sd-ink);
  background: var(--sd-card);
  border: 1px solid var(--sd-border);
  transition: all 0.18s;
}
.sd-pill:hover { border-color: var(--sd-blue); color: var(--sd-blue); }
.sd-pill.is-active {
  background: var(--sd-blue);
  border-color: var(--sd-blue);
  color: #fff;
}
.sd-pill__count { font-size: 0.7em; opacity: 0.75; }

/* Buttons */
.sd-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.18s, transform 0.15s;
}
.sd-btn--blue { background: var(--sd-blue); color: #fff; }
.sd-btn--blue:hover { background: var(--sd-blue-deep); }
.sd-btn--orange { background: var(--sd-orange); color: #fff; }
.sd-btn--orange:hover { background: var(--sd-orange-dark); }

/* Notice cards */
.sd-notice-list { display: flex; flex-direction: column; gap: 0.75rem; }
.sd-notice-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: var(--sd-card);
  border-radius: 6px;
  padding: 1.125rem 1.25rem;
  border-left: 4px solid var(--sd-blue);
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
  transition: box-shadow 0.2s, transform 0.2s;
}
.sd-notice-card:hover {
  box-shadow: 0 6px 20px rgba(29,78,216,.1);
  transform: translateY(-1px);
}
.sd-notice-card--important { border-left-color: var(--sd-orange); }
.sd-notice-card__date {
  font-size: 0.72rem;
  color: var(--sd-muted);
  display: block;
  margin-bottom: 0.35rem;
}
.sd-notice-card__title {
  font-size: clamp(0.88rem, 1.6vw, 1rem);
  font-weight: 700;
  margin: 0 0 0.35rem;
}
.sd-notice-card__title a {
  color: var(--sd-ink);
  text-decoration: none;
  transition: color 0.15s;
}
.sd-notice-card__title a:hover { color: var(--sd-blue); }
.sd-notice-card__excerpt {
  font-size: 0.82rem;
  color: var(--sd-muted);
  line-height: 1.65;
  margin: 0;
  max-width: 52rem;
}
.sd-notice-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* Blog grid */
.sd-blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
  gap: clamp(1.25rem, 2.5vw, 1.75rem);
  list-style: none;
  margin: 0;
  padding: 0;
}
.sd-blog-card {
  background: var(--sd-card);
  border-radius: 8px;
  overflow: hidden;
  border-top: 4px solid var(--sd-orange);
  box-shadow: 0 2px 10px rgba(0,0,0,.06);
  transition: transform 0.22s, box-shadow 0.22s;
}
.sd-blog-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 28px rgba(29,78,216,.12);
}
.sd-blog-card a { text-decoration: none; color: inherit; display: block; }
.sd-blog-card__thumb {
  aspect-ratio: 16/10;
  overflow: hidden;
  background: var(--sd-border);
}
.sd-blog-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}
.sd-blog-card:hover .sd-blog-card__thumb img { transform: scale(1.05); }
.sd-blog-card__body { padding: 1.125rem 1.25rem 1.25rem; }
.sd-blog-card__cat {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: var(--sd-blue);
  color: #fff;
  padding: 0.15rem 0.5rem;
  border-radius: 3px;
  margin-bottom: 0.5rem;
}
.sd-blog-card__title {
  font-family: 'Poppins', sans-serif;
  font-size: clamp(0.9rem, 1.5vw, 1.05rem);
  font-weight: 700;
  color: var(--sd-ink);
  margin: 0 0 0.5rem;
  line-height: 1.35;
  transition: color 0.15s;
}
.sd-blog-card:hover .sd-blog-card__title { color: var(--sd-blue); }
.sd-blog-card__excerpt {
  font-size: 0.82rem;
  color: var(--sd-muted);
  line-height: 1.6;
  margin: 0 0 0.65rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.sd-blog-card__date { font-size: 0.72rem; color: var(--sd-muted); }

/* Gallery masonry */
#sd-gallery-grid {
  columns: 2;
  column-gap: 1rem;
}
@media (min-width: 640px) { #sd-gallery-grid { columns: 3; } }
@media (min-width: 1024px) { #sd-gallery-grid { columns: 4; } }
.sd-gallery-item {
  break-inside: avoid;
  margin-bottom: 1rem;
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  background: var(--sd-border);
}
.sd-gallery-item img {
  width: 100%;
  display: block;
  transition: transform 0.35s;
}
.sd-gallery-item:hover img { transform: scale(1.04); }
.sd-gallery-item__overlay {
  position: absolute;
  inset: 0;
  background: rgba(26,58,143,0);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.25s;
  color: #fff;
}
.sd-gallery-item:hover .sd-gallery-item__overlay { background: rgba(26,58,143,.45); }
.sd-gallery-badge {
  position: absolute;
  bottom: 0.5rem;
  right: 0.5rem;
  background: rgba(0,0,0,.65);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
}

/* Video grid */
.sd-video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 1.25rem;
}
.sd-video-card {
  background: var(--sd-card);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,.07);
}
.sd-video-card__embed {
  position: relative;
  padding-bottom: 56.25%;
  background: #111;
}
.sd-video-card__embed iframe,
.sd-video-card__embed video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.sd-video-card__body {
  padding: 0.875rem 1rem;
  border-top: 2px solid var(--sd-blue);
}
.sd-video-card__title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--sd-ink);
  margin: 0;
}

/* About */
.sd-about-hero-img {
  width: 100%;
  max-height: 320px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 1.25rem;
}
.sd-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}
.sd-stat {
  background: linear-gradient(135deg, var(--sd-blue), var(--sd-blue-deep));
  color: #fff;
  text-align: center;
  padding: 1.25rem 1rem;
  border-radius: 8px;
}
.sd-stat__num {
  font-family: 'Poppins', sans-serif;
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  font-weight: 800;
}
.sd-stat__label { font-size: 0.78rem; opacity: 0.9; margin-top: 0.25rem; }
.sd-mv-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 1.5rem 0;
}
@media (max-width: 640px) { .sd-mv-grid { grid-template-columns: 1fr; } }
.sd-mv-card {
  background: var(--sd-card);
  padding: 1.25rem;
  border-radius: 6px;
  border-left: 4px solid var(--sd-blue);
  box-shadow: 0 1px 4px rgba(0,0,0,.05);
}
.sd-mv-card h3 { color: var(--sd-blue); font-weight: 700; margin-bottom: 0.5rem; }
.sd-content-card {
  background: var(--sd-card);
  border-radius: 8px;
  padding: clamp(1.25rem, 3vw, 2rem);
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
  margin-bottom: 1.25rem;
}
.sd-prose { line-height: 1.85; color: #374151; font-size: 0.95rem; }
.sd-prose p { margin-bottom: 1em; }
.sd-prose h2 { color: var(--sd-blue); font-weight: 800; margin: 1.5em 0 0.5em; }
.sd-team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.25rem;
}

/* Single post */
.sd-single-hero {
  max-width: var(--sd-max);
  margin: 0 auto;
  padding: 0 var(--px, clamp(12px, 3vw, 28px));
}
.sd-single-hero img {
  width: 100%;
  max-height: 480px;
  object-fit: cover;
  border-radius: 8px;
  margin-top: 1rem;
}
.sd-single-layout {
  max-width: 720px;
  margin: 0 auto;
  padding: 2rem var(--px, clamp(12px, 3vw, 28px)) 3rem;
}
.sd-single-title {
  font-family: 'Poppins', sans-serif;
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  font-weight: 800;
  color: var(--sd-ink);
  line-height: 1.25;
  margin: 0 0 1rem;
}
.sd-single-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  font-size: 0.8rem;
  color: var(--sd-muted);
  padding-bottom: 1.25rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--sd-border);
}
.sd-back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--sd-blue);
  font-weight: 600;
  font-size: 0.88rem;
  text-decoration: none;
  margin-top: 2rem;
}
.sd-back-link:hover { color: var(--sd-blue-dark); }

/* Pagination */
.sd-pagination {
  margin-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  justify-content: center;
}
.sd-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.25rem;
  height: 2.25rem;
  padding: 0 0.5rem;
  border-radius: 4px;
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--sd-ink);
  background: var(--sd-card);
  border: 1px solid var(--sd-border);
}
.sd-pagination .page-numbers.current,
.sd-pagination .page-numbers:hover {
  background: var(--sd-blue);
  border-color: var(--sd-blue);
  color: #fff;
}

.sd-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--sd-muted);
  background: var(--sd-card);
  border-radius: 8px;
}

@media (max-width: 768px) {
  .about-story-grid { grid-template-columns: 1fr !important; }
  .report-layout { grid-template-columns: 1fr !important; }
  .message-layout { grid-template-columns: 1fr !important; }
}

/* ── Homepage sections ── */
.home-section-heading {
  font-family: 'Poppins', sans-serif;
  font-size: clamp(1.1rem, 2.5vw, 1.45rem);
  font-weight: 800;
  color: var(--sd-ink);
  margin: 0 0 clamp(1rem, 2.5vw, 1.5rem);
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--sd-border);
}

.home-notices-section,
.home-messages-section {
  padding: clamp(1.75rem, 4vw, 2.75rem) 0;
  background: var(--sd-bg);
}
.home-notices-section { border-top: 1px solid var(--sd-border); }

.home-notices-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(14px, 2.5vw, 22px);
  align-items: stretch;
}
@media (max-width: 900px) {
  .home-notices-grid { grid-template-columns: 1fr; }
}

.home-notice-panel {
  background: var(--sd-card);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,.07);
  display: flex;
  flex-direction: column;
  min-height: 320px;
}
.home-notice-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 16px;
  background: var(--sd-blue-dark);
  color: #fff;
}
.home-notice-panel--orange .home-notice-panel__head {
  background: linear-gradient(90deg, #c2410c, var(--sd-orange));
}
.home-notice-panel__title {
  font-family: 'Poppins', sans-serif;
  font-size: clamp(0.88rem, 1.6vw, 1rem);
  font-weight: 700;
  margin: 0;
}
.home-notice-panel__more {
  font-size: 0.72rem;
  color: #fde68a;
  text-decoration: none;
  white-space: nowrap;
}
.home-notice-panel__more:hover { text-decoration: underline; }

.home-notice-tabs {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  background: var(--sd-blue);
  scrollbar-width: thin;
}
.home-notice-panel--orange .home-notice-tabs {
  background: #1a3a8f;
}
.home-notice-tab {
  flex-shrink: 0;
  border: none;
  background: transparent;
  color: rgba(255,255,255,.85);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 10px 14px;
  cursor: pointer;
  text-decoration: none;
  font-family: inherit;
  border-bottom: 3px solid transparent;
  transition: background .15s, border-color .15s;
}
.home-notice-tab:hover { background: rgba(255,255,255,.1); color: #fff; }
.home-notice-tab.is-active {
  background: rgba(255,255,255,.12);
  color: #fff;
  border-bottom-color: var(--sd-orange);
}

.home-notice-panel__body {
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.home-notice-list {
  list-style: none;
  margin: 0;
  padding: 0;
  overflow-y: auto;
  max-height: 280px;
  flex: 1;
}
.home-notice-list[hidden] { display: none !important; }
.home-notice-list__item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--sd-border);
}
.home-notice-list__item:last-child { border-bottom: none; }
.home-notice-list__link {
  flex: 1;
  text-decoration: none;
  color: inherit;
  min-width: 0;
}
.home-notice-list__link:hover .home-notice-list__title { color: var(--sd-blue); }
.home-notice-list__title {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--sd-ink);
  line-height: 1.4;
  margin-bottom: 4px;
}
.home-notice-list__meta {
  font-size: 0.68rem;
  color: var(--sd-muted);
}
.home-notice-list__pdf {
  flex-shrink: 0;
  font-size: 0.65rem;
  font-weight: 700;
  color: #fff;
  background: var(--sd-orange);
  padding: 3px 8px;
  border-radius: 3px;
  text-decoration: none;
}
.home-notice-list__empty {
  padding: 2rem 1rem;
  text-align: center;
  color: var(--sd-muted);
  font-size: 0.85rem;
}

.home-messages-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(14px, 2.5vw, 22px);
  align-items: stretch;   /* equal height columns */
}
@media (max-width: 768px) {
  .home-messages-grid { grid-template-columns: 1fr; }
}
.home-message-card {
  background: var(--sd-card);
  border-radius: 8px;
  box-shadow: 0 2px 14px rgba(29,78,216,.08);
  border-top: 4px solid var(--sd-blue);
  display: flex;
  flex-direction: column;
  height: 100%;
}
.home-message-card--principal { border-top-color: var(--sd-orange); }
.home-message-card__header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 1.25rem 1.25rem 0;
  background: linear-gradient(180deg, #f8faff 0%, #fff 100%);
}
.home-message-card__photo {
  width: 88px;
  height: 88px;
  border-radius: 8px;
  object-fit: cover;
  border: 2px solid var(--sd-border);
  flex-shrink: 0;
}
.home-message-card__initial {
  width: 88px;
  height: 88px;
  border-radius: 8px;
  background: var(--sd-blue);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 2rem;
  font-weight: 800;
  font-family: 'Poppins', sans-serif;
  flex-shrink: 0;
}
.home-message-card--principal .home-message-card__initial { background: var(--sd-orange); }
.home-message-card__role {
  font-family: 'Poppins', sans-serif;
  font-size: 1rem;
  font-weight: 800;
  color: var(--sd-blue);
  margin: 0 0 4px;
}
.home-message-card--principal .home-message-card__role { color: var(--sd-orange-dark); }
.home-message-card__name {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--sd-muted);
  margin: 0;
}
.home-message-card__body {
  padding: 1rem 1.25rem 1.25rem;
  font-size: 0.88rem;
  line-height: 1.75;
  flex: 1;
}
.home-message-card__empty {
  color: var(--sd-muted);
  font-style: italic;
}

.notice-single-tabs { margin-bottom: 1.25rem; border-radius: 6px; overflow: hidden; }
.notice-single-board .home-notice-list { max-height: none; }
.notice-single-related {
  margin-top: 1.5rem;
  background: var(--sd-card);
  border-radius: 8px;
  padding: 1.25rem;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.notice-single-content__title {
  font-family: 'Poppins', sans-serif;
  font-size: clamp(1.2rem, 3vw, 1.65rem);
  font-weight: 800;
  color: var(--sd-ink);
  margin: 0 0 0.5rem;
}
.notice-single-content__meta {
  font-size: 0.8rem;
  color: var(--sd-muted);
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--sd-border);
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
}
.notice-single-content__cat {
  background: var(--sd-blue);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 3px;
}

.mob-nav-link {
  display: block;
  padding: 10px 22px 10px 36px;
  font-size: 0.84rem;
  color: #374151;
  text-decoration: none;
  border-bottom: 1px solid #eef0f7;
}
.mob-nav-link:hover { background: #f0f4ff; color: var(--sd-blue); }

/* Lightbox */
#sd-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(15,23,42,.94);
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
#sd-lightbox.open { display: flex; }
#sd-lightbox img {
  max-width: 100%;
  max-height: 90vh;
  border-radius: 6px;
}
.sd-lb-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(255,255,255,.15);
  border: none;
  color: #fff;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.25rem;
}

/* ═══════════════════════════════════════
   PAGE LAYOUT — flush chrome, no top gaps
═══════════════════════════════════════ */

/* Quiz */
.qz-wrap { background: #f8fafc; padding-bottom: 4rem; margin: 0; }
.qz-inner {
  max-width: 780px;
  margin: 0 auto;
  padding: 0 clamp(12px, 3vw, 28px);
}

/* About */
.ab-page { margin: 0; padding: 0; }
.ab-hero-breadcrumb { margin-bottom: 1.25rem; }

/* Gallery — qf-gallery-wrap is now nested inside sd-section */
.qf-gallery-wrap { margin: 0; }
/* vp-content-band is now nested inside sd-section — no extra padding/bg needed */
.vp-content-band { margin: 0; }

/* Single post featured image */
.sp-feat-wrap { padding-top: 0; }
