/* Kshatriya Komarpanth Samaj — #643AC2 + black */
:root {
  --color-primary: #643ac2;
  --color-primary-dark: #3d2480;
  --color-primary-mid: #4f2e9e;
  --color-primary-light: #8b6ae0;
  --color-on-dark: #e8ddff;
  --color-ink: #0a0a0a;
  --color-muted: #525252;
  --color-bg: #f6f4fc;
  --color-white: #ffffff;
  --color-black: #000000;
  --color-accent-soft: rgba(100, 58, 194, 0.12);
  --radius: 12px;
  --radius-lg: 18px;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
  --shadow-hover: 0 12px 40px rgba(0, 0, 0, 0.14);
  --nav-h: 64px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--color-bg);
  color: var(--color-ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--color-primary);
  text-decoration: none;
}

a:hover {
  color: var(--color-primary-light);
}

/* ——— Navbar ——— */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(246, 244, 252, 0.96) 100%);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(100, 58, 194, 0.15);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.85) inset;
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
  min-height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-shrink: 0;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: linear-gradient(145deg, var(--color-primary) 0%, var(--color-black) 100%);
  color: #fff;
  font-weight: 800;
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  display: grid;
  place-items: center;
  line-height: 1.1;
  text-align: center;
  box-shadow: var(--shadow);
}

.brand-text .name {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--color-black);
  line-height: 1.2;
}

.brand-text .tag {
  font-size: 0.72rem;
  color: var(--color-muted);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-wrap: wrap;
}

.nav-links a {
  padding: 0.45rem 0.75rem;
  border-radius: 8px;
  color: var(--color-ink);
  font-size: 0.9rem;
  font-weight: 500;
  transition: background 0.15s ease, color 0.15s ease;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  background: var(--color-accent-soft);
  color: var(--color-primary-dark);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(100, 58, 194, 0.25);
  border-radius: 10px;
  background: var(--color-white);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  padding: 0;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--color-black);
  border-radius: 1px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.site-header.is-open .nav-toggle span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.site-header.is-open .nav-toggle span:nth-child(2) {
  opacity: 0;
}

.site-header.is-open .nav-toggle span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    padding: 0.75rem 1rem 1rem;
    background: linear-gradient(180deg, #fff 0%, var(--color-bg) 100%);
    border-bottom: 1px solid rgba(100, 58, 194, 0.12);
    box-shadow: var(--shadow);
    display: none;
  }

  .site-header.is-open .nav-links {
    display: flex;
  }

  .nav-links a {
    padding: 0.65rem 1rem;
  }
}

/* ——— Main layout ——— */
main {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.25rem 1rem 3rem;
}

.section-title {
  font-size: clamp(1.25rem, 2.5vw, 1.5rem);
  font-weight: 700;
  color: var(--color-black);
  margin: 0 0 1rem;
  padding-bottom: 0.35rem;
  border-bottom: 2px solid var(--color-primary);
  display: inline-block;
}

/* ——— Hero: slider + updates ——— */
.hero-grid {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 1rem;
  margin-bottom: 2rem;
  align-items: stretch;
}

@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }
}

.slider-wrap {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--color-black);
  aspect-ratio: 16 / 9;
  max-height: 380px;
  height: 100%;
}

.slider-slides {
  position: relative;
  width: 100%;
  height: 100%;
}

.slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.6s ease;
  pointer-events: none;
}

.slide.is-active {
  opacity: 1;
  pointer-events: auto;
  z-index: 1;
}

.slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.slide-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  background: #000;
  color: #fff;
  padding: 0.65rem 1rem 0.75rem;
  font-size: 0.9rem;
  line-height: 1.4;
}

.slide-caption strong {
  display: block;
  font-size: 1rem;
  margin-bottom: 0.15rem;
  color: var(--color-on-dark);
}

.slider-dots {
  position: absolute;
  bottom: 3.5rem;
  right: 0.75rem;
  z-index: 3;
  display: flex;
  gap: 6px;
}

.slider-dots button {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
  padding: 0;
  transition: background 0.2s, transform 0.2s;
}

.slider-dots button[aria-selected="true"] {
  background: #fff;
  transform: scale(1.15);
}

/* Updates panel */
.updates-panel {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(100, 58, 194, 0.14);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  min-height: 200px;
  max-height: 380px;
  height: 100%;
}

.updates-head {
  flex-shrink: 0;
  padding: 0.75rem 1rem;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-black) 100%);
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
}

.updates-scroll {
  flex: 1;
  overflow: hidden;
  position: relative;
  mask-image: linear-gradient(to bottom, transparent, #000 8%, #000 92%, transparent);
  min-height: 0;
}

.updates-track {
  animation: updates-marquee 22s linear infinite;
  padding: 0.5rem 0;
}

.updates-track.is-static {
  animation: none;
}

.updates-track:hover {
  animation-play-state: paused;
}

@keyframes updates-marquee {
  0% {
    transform: translateY(0);
  }
  100% {
    transform: translateY(-50%);
  }
}

.update-item {
  padding: 0.65rem 1rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  font-size: 0.85rem;
}

.update-item time {
  display: block;
  font-size: 0.72rem;
  color: var(--color-primary);
  font-weight: 600;
  margin-bottom: 0.2rem;
}

/* ——— Quick links ——— */
.quick-links {
  margin-bottom: 2rem;
}

.cards-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}

.cards-row.cards-row--3 {
  width: 100%;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 980px) {
  .cards-row.cards-row--3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .cards-row.cards-row--3 {
    grid-template-columns: 1fr;
  }
}

.link-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  min-height: 160px;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  color: #fff;
}

.link-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

.link-card-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: transform 0.35s ease;
}

.link-card:hover .link-card-bg {
  transform: scale(1.04);
}

.link-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.82) 0%, rgba(100, 58, 194, 0.55) 55%, rgba(0, 0, 0, 0.45) 100%);
}

.link-card-inner {
  position: relative;
  z-index: 1;
  padding: 1.25rem 1.25rem 1rem;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.link-card h3 {
  margin: 0 0 0.35rem;
  font-size: 1.25rem;
  font-weight: 700;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.35);
}

.link-card p {
  margin: 0;
  font-size: 0.85rem;
  opacity: 0.95;
  line-height: 1.45;
}

.link-card .cta {
  margin-top: 0.65rem;
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--color-on-dark);
}

/* ——— Regions ——— */
.region-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.region-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  background: #fff;
  border: 1px solid rgba(100, 58, 194, 0.16);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  color: var(--color-black);
  font-weight: 600;
  font-size: 0.9rem;
  line-height: 1;
}

.region-tag:hover {
  border-color: rgba(100, 58, 194, 0.35);
}

.regions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.75rem;
}

.region-card {
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--color-white);
  border: 1px solid rgba(100, 58, 194, 0.12);
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
  text-align: center;
}

.region-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.region-card .thumb {
  aspect-ratio: 4 / 3;
  background-size: cover;
  background-position: center;
}

.region-card .label {
  padding: 0.5rem 0.4rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-black);
}

/* ——— Footer ——— */
.site-footer {
  margin-top: auto;
  background: linear-gradient(180deg, var(--color-primary-dark) 0%, var(--color-black) 100%);
  color: #d4d4d4;
  padding: 2rem 1rem;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  font-size: 0.9rem;
}

.site-footer a {
  color: var(--color-on-dark);
}

.site-footer a:hover {
  color: #ffffff;
}

.footer-brand .name {
  font-weight: 700;
  font-size: 1.05rem;
  color: #fff;
  margin-bottom: 0.35rem;
}

.footer-col h4 {
  margin: 0 0 0.65rem;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.45);
}

.footer-col ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-col li {
  margin-bottom: 0.4rem;
}

.footer-bottom {
  max-width: 1200px;
  margin: 1.5rem auto 0;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  text-align: center;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.4);
}

.page-wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.page-wrap main {
  flex: 1;
}

/* ——— About page ——— */
.about-hero {
  width: 100%;
  align-self: stretch;
  justify-self: stretch;
  border-radius: var(--radius-lg);
  padding: 2rem 1.75rem;
  background:
    radial-gradient(ellipse 80% 60% at 10% 0%, rgba(100, 58, 194, 0.18) 0%, transparent 55%),
    radial-gradient(ellipse 70% 60% at 90% 20%, rgba(0, 0, 0, 0.06) 0%, transparent 55%),
    linear-gradient(180deg, #ffffff 0%, #faf7ff 100%);
  border: 1px solid rgba(100, 58, 194, 0.12);
  box-shadow: var(--shadow);
  margin-bottom: 1.5rem;
}

.about-eyebrow {
  margin: 0 0 0.35rem;
  color: var(--color-primary);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.75rem;
}

.about-title {
  margin: 0 0 0.5rem;
  color: var(--color-black);
  font-size: clamp(1.6rem, 3.2vw, 2.2rem);
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.about-subtitle {
  margin: 0;
  color: var(--color-muted);
  font-size: 1rem;
  max-width: 62ch;
}

.about-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 1.25rem;
  align-items: start;
}

@media (max-width: 900px) {
  .about-grid {
    grid-template-columns: 1fr;
  }
}

.about-card {
  background: #fff;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(100, 58, 194, 0.12);
  box-shadow: var(--shadow);
  padding: 1.5rem 1.5rem 1.35rem;
}

.about-card p {
  margin-top: 0.75rem;
  margin-bottom: 0.75rem;
  color: var(--color-muted);
  font-size: 0.98rem;
  line-height: 1.7;
}

.page-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}

.page-card {
  display: block;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.page-card--plain {
  min-height: 160px;
}

.page-card-title {
  margin: 0 0 0.35rem;
  font-size: 1.1rem;
  color: var(--color-black);
}

.page-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

.page-card:focus-visible {
  outline: 3px solid rgba(100, 58, 194, 0.35);
  outline-offset: 3px;
}

.about-gallery {
  display: grid;
  gap: 1rem;
}

.about-figure {
  margin: 0;
  background: #fff;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: var(--shadow);
}

.about-figure img {
  width: 100%;
  height: auto;
  display: block;
}

.about-figure figcaption {
  padding: 0.7rem 0.95rem;
  font-size: 0.85rem;
  color: var(--color-muted);
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.about-gallery-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 520px) {
  .about-gallery-row {
    grid-template-columns: 1fr;
  }
}
