/* =========================================================
   KannadaGK
   Karnataka GK - Common Chapter CSS

   FILE:
   karnataka-gk/css/karnataka-chapter.css

   USED BY ALL CHAPTER PAGES:
   - karnataka-moola-mahiti.html
   - karnataka-samajika-samskruti.html
   - karnataka-janapada.html
   - karnataka-kale.html
   - kannada-sahitya.html
   - kannada-bhashe.html
   - etc.

   IMPORTANT:
   Same CSS file can be used for every chapter.
========================================================= */


/* =========================================================
   VARIABLES
========================================================= */

:root {
  --kch-primary: #0b5ed7;
  --kch-primary-dark: #084298;
  --kch-primary-light: #eaf3ff;

  --kch-secondary: #14b8a6;
  --kch-secondary-light: #e9fbf8;

  --kch-success: #16a34a;
  --kch-success-light: #ecfdf3;

  --kch-warning: #f59e0b;
  --kch-warning-light: #fff8e7;

  --kch-danger: #dc2626;
  --kch-danger-light: #fff1f2;

  --kch-text: #1f2937;
  --kch-text-dark: #111827;
  --kch-text-light: #64748b;

  --kch-border: #e2e8f0;

  --kch-bg: #f6f9fd;
  --kch-white: #ffffff;

  --kch-radius: 14px;

  --kch-shadow:
    0 6px 25px rgba(15, 23, 42, 0.06);

  --kch-shadow-hover:
    0 12px 30px rgba(11, 94, 215, 0.12);
}


/* =========================================================
   PAGE
========================================================= */

.kch-page {
  width: 100%;
  min-height: 100vh;
  padding: 25px 0 60px;

  background:
    linear-gradient(
      180deg,
      #f7faff 0%,
      #ffffff 35%,
      #f8fafc 100%
    );
}

.kch-container {
  width: 92%;
  max-width: 1100px;
  margin: 0 auto;
}


/* =========================================================
   BREADCRUMB
========================================================= */

.kch-breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;

  margin-bottom: 18px;

  color: var(--kch-text-light);
  font-size: 13px;
}

.kch-breadcrumb a {
  color: var(--kch-primary);
  text-decoration: none;
  font-weight: 600;
}

.kch-breadcrumb a:hover {
  text-decoration: underline;
}

.kch-breadcrumb span {
  color: #94a3b8;
}

.kch-breadcrumb strong {
  color: var(--kch-text);
}


/* =========================================================
   HERO
========================================================= */

.kch-hero {
  position: relative;
  overflow: hidden;

  padding: 34px 38px;

  border-radius: 18px;

  background:
    radial-gradient(
      circle at 90% 20%,
      rgba(255,255,255,0.18),
      transparent 28%
    ),
    linear-gradient(
      135deg,
      #0b5ed7,
      #0645a5
    );

  color: #fff;

  box-shadow:
    0 14px 35px rgba(11, 94, 215, 0.18);
}

.kch-hero::before {
  content: "";

  position: absolute;

  width: 240px;
  height: 240px;

  right: -90px;
  bottom: -120px;

  border-radius: 50%;

  background:
    rgba(255,255,255,0.07);
}

.kch-hero::after {
  content: "";

  position: absolute;

  width: 100px;
  height: 100px;

  right: 180px;
  top: -50px;

  border-radius: 50%;

  background:
    rgba(255,255,255,0.06);
}

.kch-hero-content {
  position: relative;
  z-index: 2;
}

.kch-label {
  display: inline-flex;
  align-items: center;

  padding: 6px 11px;
  margin-bottom: 12px;

  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 50px;

  background:
    rgba(255,255,255,0.13);

  color: #fff;

  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.8px;
}

.kch-hero h1 {
  margin: 0 0 10px;

  color: #fff;

  font-size: 34px;
  line-height: 1.3;
  font-weight: 800;
}

.kch-hero p {
  max-width: 800px;

  margin: 0;

  color: #e8f1ff;

  font-size: 15px;
  line-height: 1.8;
}


/* =========================================================
   HERO META
========================================================= */

.kch-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;

  margin-top: 20px;
}

.kch-hero-meta span {
  display: inline-flex;
  align-items: center;

  padding: 6px 10px;

  border-radius: 7px;

  background:
    rgba(255,255,255,0.11);

  border:
    1px solid rgba(255,255,255,0.16);

  color: #fff;

  font-size: 11px;
}


/* =========================================================
   QUICK NAVIGATION
========================================================= */

.kch-quick-nav {
  display: flex;
  align-items: center;
  gap: 8px;

  overflow-x: auto;

  margin: 18px 0;
  padding: 10px;

  border: 1px solid var(--kch-border);
  border-radius: 11px;

  background: #fff;

  box-shadow:
    0 3px 15px rgba(15,23,42,0.04);

  scrollbar-width: thin;
}

.kch-quick-nav a {
  flex: 0 0 auto;

  padding: 7px 12px;

  border-radius: 7px;

  background: #f8fafc;

  color: var(--kch-text);

  text-decoration: none;

  font-size: 12px;
  font-weight: 600;

  transition: 0.2s ease;
}

.kch-quick-nav a:hover,
.kch-quick-nav a.active {
  background: var(--kch-primary);
  color: #fff;
}


/* =========================================================
   CONTENT LAYOUT
========================================================= */

.kch-layout {
  display: grid;

  grid-template-columns:
    minmax(0, 1fr)
    270px;

  gap: 20px;

  align-items: start;
}

.kch-main {
  min-width: 0;
}


/* =========================================================
   SECTION
========================================================= */

.kch-section {
  margin-bottom: 20px;
  padding: 24px;

  border: 1px solid var(--kch-border);
  border-radius: var(--kch-radius);

  background: #fff;

  box-shadow: var(--kch-shadow);
}


/* =========================================================
   SECTION TITLE
========================================================= */

.kch-section-title {
  display: flex;
  align-items: flex-start;
  gap: 11px;

  margin-bottom: 17px;
  padding-bottom: 13px;

  border-bottom: 1px solid #edf1f5;
}

.kch-section-number {
  display: flex;
  align-items: center;
  justify-content: center;

  flex: 0 0 auto;

  width: 32px;
  height: 32px;

  border-radius: 9px;

  background:
    var(--kch-primary-light);

  color:
    var(--kch-primary);

  font-size: 12px;
  font-weight: 800;
}

.kch-section-title h2 {
  margin: 0;

  color: var(--kch-text-dark);

  font-size: 22px;
  line-height: 1.4;
}

.kch-section-title p {
  margin: 3px 0 0;

  color: var(--kch-text-light);

  font-size: 12px;
  line-height: 1.6;
}


/* =========================================================
   TEXT
========================================================= */

.kch-text {
  color: var(--kch-text);

  font-size: 14px;
  line-height: 1.9;
}

.kch-text p {
  margin: 0 0 12px;
}

.kch-text p:last-child {
  margin-bottom: 0;
}


/* =========================================================
   INFO GRID
========================================================= */

.kch-info-grid {
  display: grid;

  grid-template-columns:
    repeat(2, minmax(0, 1fr));

  gap: 12px;
}

.kch-info-card {
  padding: 15px;

  border: 1px solid var(--kch-border);
  border-radius: 11px;

  background: #fbfdff;

  transition: 0.2s ease;
}

.kch-info-card:hover {
  border-color: #b9d2f6;

  box-shadow:
    var(--kch-shadow-hover);

  transform: translateY(-2px);
}

.kch-info-card small {
  display: block;

  margin-bottom: 5px;

  color: var(--kch-text-light);

  font-size: 10px;
  font-weight: 700;

  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.kch-info-card strong {
  display: block;

  color: var(--kch-text-dark);

  font-size: 15px;
  line-height: 1.5;
}


/* =========================================================
   FACT
========================================================= */

.kch-fact {
  display: flex;
  align-items: flex-start;
  gap: 12px;

  margin: 15px 0;
  padding: 15px;

  border: 1px solid #cfe0f7;
  border-left: 4px solid var(--kch-primary);

  border-radius: 9px;

  background:
    var(--kch-primary-light);
}

.kch-fact-icon {
  flex: 0 0 auto;
  font-size: 19px;
}

.kch-fact strong {
  display: block;

  margin-bottom: 3px;

  color: var(--kch-primary-dark);

  font-size: 13px;
}

.kch-fact p {
  margin: 0;

  color: #334155;

  font-size: 13px;
  line-height: 1.7;
}


/* =========================================================
   IMPORTANT
========================================================= */

.kch-important {
  margin: 15px 0;
  padding: 16px;

  border: 1px solid #f4df9b;
  border-left: 4px solid var(--kch-warning);

  border-radius: 9px;

  background:
    var(--kch-warning-light);
}

.kch-important strong {
  display: block;

  margin-bottom: 5px;

  color: #785800;

  font-size: 13px;
}

.kch-important p {
  margin: 0;

  color: #6b5a25;

  font-size: 13px;
  line-height: 1.7;
}


/* =========================================================
   SUCCESS
========================================================= */

.kch-success {
  padding: 16px;

  border: 1px solid #bce8ce;
  border-left: 4px solid var(--kch-success);

  border-radius: 9px;

  background:
    var(--kch-success-light);
}

.kch-success strong {
  color: #166534;
  font-size: 13px;
}

.kch-success p {
  margin: 5px 0 0;

  color: #365b43;

  font-size: 13px;
  line-height: 1.7;
}


/* =========================================================
   LIST
========================================================= */

.kch-list {
  margin: 0;
  padding-left: 20px;

  color: var(--kch-text);
}

.kch-list li {
  margin-bottom: 8px;
  padding-left: 3px;

  font-size: 14px;
  line-height: 1.75;
}

.kch-list li:last-child {
  margin-bottom: 0;
}

.kch-list li::marker {
  color: var(--kch-primary);
}


/* =========================================================
   TABLE
========================================================= */

.kch-table-wrap {
  width: 100%;
  overflow-x: auto;

  margin: 15px 0;

  border: 1px solid var(--kch-border);
  border-radius: 10px;
}

.kch-table {
  width: 100%;
  min-width: 600px;

  border-collapse: collapse;

  background: #fff;
}

.kch-table th {
  padding: 12px 13px;

  background: #eef5ff;

  color: var(--kch-primary-dark);

  text-align: left;

  font-size: 12px;
  font-weight: 800;

  border-bottom: 1px solid #d7e5f8;
}

.kch-table td {
  padding: 11px 13px;

  color: var(--kch-text);

  font-size: 13px;
  line-height: 1.6;

  border-bottom: 1px solid #edf1f5;
}

.kch-table tr:last-child td {
  border-bottom: none;
}

.kch-table tbody tr:hover {
  background: #f8fbff;
}


/* =========================================================
   SIDEBAR
========================================================= */

.kch-sidebar {
  min-width: 0;
}

.kch-side-card {
  margin-bottom: 16px;
  padding: 18px;

  border: 1px solid var(--kch-border);
  border-radius: 12px;

  background: #fff;

  box-shadow: var(--kch-shadow);
}

.kch-side-card:last-child {
  margin-bottom: 0;
}

.kch-side-card h3 {
  margin: 0 0 13px;
  padding-bottom: 10px;

  border-bottom: 1px solid #edf1f5;

  color: var(--kch-text-dark);

  font-size: 16px;
}

.kch-side-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.kch-side-list a {
  display: flex;
  align-items: center;
  gap: 8px;

  padding: 9px 10px;

  border-radius: 7px;

  color: var(--kch-text);

  text-decoration: none;

  font-size: 12px;
  line-height: 1.4;

  transition: 0.2s ease;
}

.kch-side-list a::before {
  content: "›";

  color: var(--kch-primary);

  font-size: 16px;
  font-weight: 800;
}

.kch-side-list a:hover {
  background: var(--kch-primary-light);
  color: var(--kch-primary);
}


/* =========================================================
   EXAM POINTS
========================================================= */

.kch-exam-points {
  display: grid;
  gap: 9px;
}

.kch-exam-point {
  display: flex;
  align-items: flex-start;
  gap: 9px;

  padding: 10px;

  border-radius: 8px;

  background: #f8fafc;
}

.kch-exam-point span {
  color: var(--kch-primary);

  font-weight: 800;
  font-size: 13px;
}

.kch-exam-point p {
  margin: 0;

  color: var(--kch-text);

  font-size: 12px;
  line-height: 1.6;
}


/* =========================================================
   MCQ
========================================================= */

.kch-mcq {
  margin-top: 20px;
}

.kch-question {
  margin-bottom: 14px;
  padding: 17px;

  border: 1px solid var(--kch-border);
  border-radius: 11px;

  background: #fff;
}

.kch-question:last-child {
  margin-bottom: 0;
}

.kch-question-number {
  display: block;

  margin-bottom: 6px;

  color: var(--kch-primary);

  font-size: 11px;
  font-weight: 800;
}

.kch-question h3 {
  margin: 0 0 12px;

  color: var(--kch-text-dark);

  font-size: 14px;
  line-height: 1.65;
}

.kch-options {
  display: grid;

  grid-template-columns:
    repeat(2, minmax(0, 1fr));

  gap: 8px;
}

.kch-option {
  padding: 9px 11px;

  border: 1px solid var(--kch-border);
  border-radius: 7px;

  background: #fafcff;

  color: var(--kch-text);

  font-size: 12px;
  line-height: 1.5;
}

.kch-answer {
  margin-top: 10px;
  padding: 9px 11px;

  border-radius: 7px;

  background:
    var(--kch-success-light);

  color:
    #166534;

  font-size: 12px;
  font-weight: 700;
}


/* =========================================================
   PREVIOUS / NEXT
========================================================= */

.kch-chapter-nav {
  display: grid;

  grid-template-columns:
    1fr 1fr;

  gap: 12px;

  margin-top: 25px;
}

.kch-chapter-nav a {
  display: flex;
  flex-direction: column;

  padding: 15px;

  border: 1px solid var(--kch-border);
  border-radius: 10px;

  background: #fff;

  color: var(--kch-text);

  text-decoration: none;

  transition: 0.2s ease;
}

.kch-chapter-nav a:hover {
  border-color: #b9d2f6;

  box-shadow:
    var(--kch-shadow-hover);

  transform: translateY(-2px);
}

.kch-chapter-nav small {
  margin-bottom: 4px;

  color: var(--kch-text-light);

  font-size: 10px;
  font-weight: 700;
}

.kch-chapter-nav strong {
  color: var(--kch-primary);

  font-size: 13px;
}

.kch-next {
  text-align: right;
}


/* =========================================================
   REVISION
========================================================= */

.kch-revision {
  margin-top: 20px;
  padding: 20px;

  border: 1px solid #cfe0f7;
  border-radius: 12px;

  background:
    linear-gradient(
      135deg,
      #f1f7ff,
      #ffffff
    );
}

.kch-revision-label {
  display: block;

  margin-bottom: 5px;

  color: var(--kch-primary);

  font-size: 10px;
  font-weight: 800;

  letter-spacing: 0.8px;
}

.kch-revision h2 {
  margin: 0 0 6px;

  color: var(--kch-text-dark);

  font-size: 19px;
}

.kch-revision p {
  margin: 0;

  color: var(--kch-text-light);

  font-size: 12px;
  line-height: 1.7;
}


/* =========================================================
   BACK TO TOP
========================================================= */

.kch-back-top {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  margin-top: 18px;
  padding: 8px 13px;

  border-radius: 7px;

  background:
    var(--kch-primary-light);

  color:
    var(--kch-primary);

  text-decoration: none;

  font-size: 11px;
  font-weight: 700;
}

.kch-back-top:hover {
  background:
    var(--kch-primary);

  color: #fff;
}


/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 950px) {

  .kch-layout {
    grid-template-columns: 1fr;
  }

  .kch-sidebar {
    display: grid;

    grid-template-columns:
      repeat(2, minmax(0, 1fr));

    gap: 14px;
  }

  .kch-side-card {
    margin-bottom: 0;
  }
}


/* =========================================================
   TABLET
========================================================= */

@media (max-width: 768px) {

  .kch-page {
    padding: 12px 0 40px;
  }

  .kch-container {
    width: 94%;
  }

  .kch-breadcrumb {
    overflow-x: auto;
    flex-wrap: nowrap;

    white-space: nowrap;

    font-size: 11px;

    padding-bottom: 3px;
  }

  .kch-hero {
    padding: 25px 20px;
    border-radius: 15px;
  }

  .kch-hero h1 {
    font-size: 27px;
  }

  .kch-hero p {
    font-size: 13px;
    line-height: 1.75;
  }

  .kch-layout {
    gap: 14px;
  }

  .kch-section {
    padding: 18px 16px;
    border-radius: 11px;
  }

  .kch-section-title h2 {
    font-size: 19px;
  }

  .kch-info-grid {
    grid-template-columns: 1fr;
  }

  .kch-sidebar {
    grid-template-columns: 1fr;
  }

  .kch-options {
    grid-template-columns: 1fr;
  }

  .kch-table {
    min-width: 550px;
  }
}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 480px) {

  .kch-container {
    width: 95%;
  }

  .kch-hero {
    padding: 22px 15px;
  }

  .kch-hero h1 {
    font-size: 23px;
  }

  .kch-hero p {
    font-size: 12px;
  }

  .kch-hero-meta {
    gap: 6px;
  }

  .kch-hero-meta span {
    padding: 5px 8px;
    font-size: 9px;
  }

  .kch-section {
    padding: 15px 13px;
  }

  .kch-section-title {
    gap: 8px;
  }

  .kch-section-number {
    width: 28px;
    height: 28px;
    font-size: 10px;
  }

  .kch-section-title h2 {
    font-size: 17px;
  }

  .kch-text {
    font-size: 13px;
    line-height: 1.8;
  }

  .kch-list li {
    font-size: 12.5px;
  }

  .kch-fact,
  .kch-important,
  .kch-success {
    padding: 12px;
  }

  .kch-table th {
    padding: 10px;
    font-size: 11px;
  }

  .kch-table td {
    padding: 9px 10px;
    font-size: 11px;
  }

  .kch-chapter-nav {
    grid-template-columns: 1fr;
  }

  .kch-next {
    text-align: left;
  }

  .kch-revision {
    padding: 16px;
  }
}


/* =========================================================
   ACCESSIBILITY
========================================================= */

.kch-page a:focus-visible {
  outline:
    3px solid rgba(11,94,215,0.30);

  outline-offset: 2px;
}


/* =========================================================
   REDUCED MOTION
========================================================= */

@media (prefers-reduced-motion: reduce) {

  .kch-info-card,
  .kch-side-list a,
  .kch-chapter-nav a {

    transition: none;
  }
}
