/* ============================================
   NTV Nishkarsha — Careers Subdomain
   Design System & Global Styles
   Koala-style Documentation Layout
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Poppins:wght@500;600;700;800&display=swap');

/* --- Custom Properties --- */
:root {
  --red: #CC0000;
  --red-dark: #A80000;
  --red-light: rgba(204, 0, 0, 0.08);
  --gold: #F5A800;
  --navy: #1A1A2E;
  --white: #FFFFFF;
  --light-bg: #F8F9FA;
  --text-dark: #1A1A2E;
  --text-body: #374151;
  --text-muted: #6B7280;
  --border: #E5E7EB;
  --border-light: #F3F4F6;

  --ff-heading: 'Poppins', sans-serif;
  --ff-body: 'Inter', sans-serif;

  --nav-height: 64px;
  --sidebar-width: 260px;
  --content-max: 720px;
  --page-max: 1120px;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06);
  --shadow-nav: 0 1px 8px rgba(0, 0, 0, 0.08);

  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;

  --transition: 0.2s ease;
}

/* --- Reset --- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-height) + 32px);
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--ff-body);
  color: var(--text-body);
  background: var(--white);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; transition: color var(--transition); }
ul, ol { list-style: none; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--ff-heading);
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-dark);
}

::selection {
  background: var(--red);
  color: var(--white);
}

/* ============================================
   NAVBAR
   ============================================ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--nav-height);
  background: var(--white);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  transition: box-shadow var(--transition);
}

.navbar.scrolled {
  box-shadow: var(--shadow-nav);
}

.navbar__inner {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar__logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.navbar__logo img {
  height: 45px;
  width: auto;
}

.navbar__links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.navbar__links a {
  font-family: var(--ff-body);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  padding: 6px 0;
  position: relative;
  transition: color var(--transition);
}

.navbar__links a:hover {
  color: var(--text-dark);
}

.navbar__links a.active {
  color: var(--red);
}

.navbar__links a.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--red);
  border-radius: 2px;
}

/* Hamburger */
.navbar__hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  flex-direction: column;
  gap: 5px;
  z-index: 1001;
}

.navbar__hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-dark);
  border-radius: 2px;
  transition: all 0.25s ease;
  transform-origin: center;
}

.navbar__hamburger.open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.navbar__hamburger.open span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.navbar__hamburger.open span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile Nav */
@media (max-width: 768px) {
  .navbar__hamburger { display: flex; }

  .navbar__links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100dvh;
    background: var(--white);
    flex-direction: column;
    align-items: flex-start;
    padding: 100px 32px 40px;
    gap: 24px;
    border-left: 1px solid var(--border);
    box-shadow: -8px 0 30px rgba(0, 0, 0, 0.08);
    transition: right 0.3s ease;
  }

  .navbar__links.open { right: 0; }

  .navbar__links a { font-size: 1rem; }

  .navbar__overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 999;
    backdrop-filter: blur(2px);
  }

  .navbar__overlay.open { display: block; }
}

/* ============================================
   PAGE LAYOUT — TWO COLUMN
   ============================================ */
.page {
  margin-top: var(--nav-height);
  display: flex;
  max-width: var(--page-max);
  margin-left: auto;
  margin-right: auto;
  padding: 0 24px;
  min-height: calc(100vh - var(--nav-height));
}

/* ---- Sidebar ---- */
.sidebar {
  width: var(--sidebar-width);
  flex-shrink: 0;
  padding: 48px 0 40px;
  position: relative;
}

.sidebar__sticky {
  position: sticky;
  top: calc(var(--nav-height) + 32px);
}

.sidebar__label {
  font-family: var(--ff-heading);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 16px;
  padding-left: 16px;
}

.sidebar__nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar__link {
  display: block;
  font-size: 0.84rem;
  font-weight: 450;
  color: var(--text-muted);
  padding: 7px 16px;
  border-left: 2px solid transparent;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  transition: all var(--transition);
  line-height: 1.5;
}

.sidebar__link:hover {
  color: var(--text-dark);
  background: var(--light-bg);
}

.sidebar__link.active {
  color: var(--red);
  border-left-color: var(--red);
  background: var(--red-light);
  font-weight: 550;
}

/* Mobile jump-to dropdown */
.sidebar-mobile {
  display: none;
}

/* ---- Main Content ---- */
.content {
  flex: 1;
  min-width: 0;
  max-width: var(--content-max);
  padding: 48px 0 80px;
  margin-left: 48px;
}

/* ============================================
   PAGE HEADER
   ============================================ */
.page-header {
  margin-bottom: 48px;
}

.page-header__title {
  font-size: 2rem;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

.page-header__meta {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.page-header__accent {
  width: 48px;
  height: 3px;
  background: var(--red);
  border-radius: 3px;
}

/* ============================================
   POLICY SECTIONS
   ============================================ */
.policy-section {
  padding-bottom: 40px;
  margin-bottom: 40px;
  border-bottom: 1px solid var(--border-light);
}

.policy-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.policy-section__heading {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 16px;
  letter-spacing: -0.01em;
}

.policy-section p {
  font-size: 0.95rem;
  line-height: 1.8;
  color: var(--text-body);
  margin-bottom: 14px;
}

.policy-section p:last-child {
  margin-bottom: 0;
}

.policy-section ul {
  margin: 8px 0 14px 0;
}

.policy-section li {
  position: relative;
  padding-left: 20px;
  font-size: 0.95rem;
  line-height: 1.8;
  color: var(--text-body);
  margin-bottom: 4px;
}

.policy-section li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 0.72em;
  width: 5px;
  height: 5px;
  background: var(--red);
  border-radius: 50%;
}

.policy-section strong {
  font-weight: 600;
  color: var(--text-dark);
}

.policy-section a {
  color: var(--red);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: rgba(204, 0, 0, 0.25);
  text-underline-offset: 3px;
  transition: text-decoration-color var(--transition);
}

.policy-section a:hover {
  text-decoration-color: var(--red);
}

/* Contact block */
.contact-block {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
  color: var(--text-body);
}

.contact-item svg {
  width: 18px;
  height: 18px;
  fill: var(--red);
  flex-shrink: 0;
}

.contact-item a {
  text-decoration: none;
  font-weight: 500;
  color: var(--red);
}

.contact-item a:hover {
  text-decoration: underline;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  background: var(--white);
  border-top: 1px solid var(--border);
  padding: 40px 24px 28px;
  text-align: center;
}

.footer__logo {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}

.footer__logo img {
  height: 38px;
  width: auto;
}

.footer__links {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.footer__links a {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color var(--transition);
}

.footer__links a:hover {
  color: var(--red);
}

.footer__copyright {
  font-size: 0.78rem;
  color: var(--text-muted);
  letter-spacing: 0.01em;
}

/* ============================================
   MOBILE SIDEBAR DROPDOWN
   ============================================ */
@media (max-width: 900px) {
  .sidebar { display: none; }

  .sidebar-mobile {
    display: block;
    margin-bottom: 32px;
  }

  .sidebar-mobile__toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 12px 16px;
    background: var(--light-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-family: var(--ff-body);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-dark);
    cursor: pointer;
    transition: all var(--transition);
  }

  .sidebar-mobile__toggle:hover {
    border-color: var(--text-muted);
  }

  .sidebar-mobile__toggle svg {
    width: 18px;
    height: 18px;
    fill: var(--text-muted);
    transition: transform 0.25s ease;
  }

  .sidebar-mobile__toggle.open svg {
    transform: rotate(180deg);
  }

  .sidebar-mobile__menu {
    display: none;
    flex-direction: column;
    gap: 2px;
    margin-top: 8px;
    padding: 8px 0;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
  }

  .sidebar-mobile__menu.open {
    display: flex;
  }

  .sidebar-mobile__menu a {
    display: block;
    padding: 10px 20px;
    font-size: 0.875rem;
    font-weight: 450;
    color: var(--text-muted);
    transition: all var(--transition);
  }

  .sidebar-mobile__menu a:hover {
    background: var(--light-bg);
    color: var(--text-dark);
  }

  .sidebar-mobile__menu a.active {
    color: var(--red);
    background: var(--red-light);
    font-weight: 550;
  }

  .page { flex-direction: column; }

  .content {
    margin-left: 0;
    padding-top: 32px;
  }
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 640px) {
  .page-header__title {
    font-size: 1.6rem;
  }

  .policy-section__heading {
    font-size: 1.1rem;
  }

  .content {
    padding-bottom: 48px;
  }

  .navbar__inner {
    padding: 0 16px;
  }

  .page {
    padding: 0 16px;
  }
}

@media (max-width: 375px) {
  .page-header__title {
    font-size: 1.4rem;
  }

  .navbar__logo img {
    height: 38px;
  }
}

@media (min-width: 1440px) {
  :root {
    --page-max: 1200px;
  }
}

/* ============================================
   SCROLL TOP
   ============================================ */
.scroll-top {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 42px;
  height: 42px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: all 0.25s ease;
  z-index: 900;
}

.scroll-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.scroll-top:hover {
  border-color: var(--red);
  box-shadow: 0 4px 16px rgba(204, 0, 0, 0.12);
}

.scroll-top svg {
  width: 18px;
  height: 18px;
  fill: var(--text-muted);
  transition: fill var(--transition);
}

.scroll-top:hover svg {
  fill: var(--red);
}

/* ============================================
   REDUCED MOTION
   ============================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
