/*
Theme Name: KnowX Child
Theme URI: https://wbcomdesigns.com/downloads/knowx-theme
Template: knowx
Author: wbcomdesigns,vapvarun
Author URI: https://github.com/vapvarun/knowx
Description: Child theme for KnowX theme
Version: 1.0.0
Requires at least: 4.8
Tested up to: 6.8.2
Requires PHP: 7.4.0
License: GNU General Public License v3.0 (or later)
License URI: https://www.gnu.org/licenses/gpl-3.0.html
Text Domain: knowx-child
*/

/**
 * Child theme styles that override parent theme styles
 * These styles are loaded after parent theme styles and will take precedence
 */

/* ===================== */
/* Font Face Declarations */
/* ===================== */
@font-face {
  font-family: 'Clash Grotesk Variable';
  src: url('assets/fonts/ClashGrotesk-Variable.woff2') format('woff2'),
       url('assets/fonts/ClashGrotesk-Variable.woff') format('woff');
  font-weight: 200 700;
  font-style: normal;
  font-display: fallback;
}

:root {
  /* ===================== */
  /* Font & Typographic Scale */
  /* ===================== */
  --font-base: "Clash Grotesk Variable", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  /* Font Sizes */
  --fs-62: 62px;
  --fs-48: 48px;
  --fs-40: 40px;
  --fs-32: 32px;
  --fs-26: 26px;
  --fs-20: 20px;
  --fs-18: 18px;
  --fs-17: 17px;
  --fs-16: 16px;
  --fs-14: 14px;
  --fs-12: 12px;

  /* Line Heights */
  --lh-tight: 1.1;
  --lh-normal: 1.3;
  --lh-relaxed: 1.5;

  /* Font Weights */
  --fw-regular: 400;
  --fw-medium: 500;
  --fw-semibold: 600;
  --fw-bold: 700;

  /* ===================== */
  /* Color Palettes */
  /* ===================== */

  /* Black Scale */
  --black-0: #ffffff;
  --black-25: #fdfdfd;
  --black-50: #f5f6f6;
  --black-75: #f1f1f1;
  --black-100: #dbdcdd;
  --black-200: #c4c5c6;
  --black-300: #949799;
  --black-400: #64696b;
  --black-500: #515659;
  --black-600: #353b3e;
  --black-700: #2e3437;
  --black-800: #242a2e;
  --black-900: #11181c;

  /* Green Scale */
  --green-50: #f3f8ea;
  --green-100: #d9e8bc;
  --green-200: #c6dd9c;
  --green-300: #accd6f;
  --green-400: #9cc453;
  --green-500: #83b528;
  --green-600: #77a524;
  --green-700: #5d811c;
  --green-800: #486416;
  --green-900: #374c11;

  /* Error Scale */
  --error-50: #fde6e6;
  --error-100: #f9b3b3;
  --error-200: #f68e8e;
  --error-300: #f25a5a;
  --error-400: #f03a3a;
  --error-500: #ec0909;
  --error-600: #d70808;
  --error-700: #a80606;
  --error-800: #820505;
  --error-900: #630404;

  /* Success Scale */
  --success-50: #e7f3eb;
  --success-100: #b4dac2;
  --success-200: #8fc8a5;
  --success-300: #5caf7c;
  --success-400: #3da062;
  --success-500: #0c883b;
  --success-600: #0b7c36;
  --success-700: #09612a;
  --success-800: #074b20;
  --success-900: #053919;

  /* Attend Scale */
  --attend-50: #fff4e6;
  --attend-100: #ffdeb0;
  --attend-200: #ffce8a;
  --attend-300: #ffb854;
  --attend-400: #ffaa33;
  --attend-500: #ff9500;
  --attend-600: #e88800;
  --attend-700: #b56a00;
  --attend-800: #8c5200;
  --attend-900: #6b3f00;
}

/* ===================== */
/* Typography - Direct Tag Styles */
/* ===================== */

/* Global font application - applies to entire site */
body,
html {
  font-family: var(--font-base);
}

/* Sticky footer - push footer to bottom (only for 404 page) */
body.error404 {
  min-height: 100vh;
  position: relative;
  padding-bottom: 200px;
}

body.error404 .site-footer {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
}

/* Headings - Apply to actual HTML tags */
h1 { font-family: var(--font-base); font-size: var(--fs-62); line-height: var(--lh-tight); }
h2 { font-family: var(--font-base); font-size: var(--fs-48); line-height: var(--lh-tight); }
h3 { font-family: var(--font-base); font-size: var(--fs-40); line-height: var(--lh-tight); }
h4 { font-family: var(--font-base); font-size: var(--fs-32); line-height: var(--lh-normal); }
h5 { font-family: var(--font-base); font-size: var(--fs-26); line-height: var(--lh-normal); }
h6 { font-family: var(--font-base); font-size: var(--fs-20); line-height: var(--lh-normal); }

/* Paragraphs - Default paragraph styling */
p { font-family: var(--font-base); font-size: var(--fs-16); font-weight: var(--fw-regular); line-height: var(--lh-relaxed); }

/* Spans - Default span styling */
span { font-family: var(--font-base); }

/* Buttons - Default button styling */
button { font-family: var(--font-base); font-size: var(--fs-16); font-weight: var(--fw-medium); }
input[type="button"],
input[type="submit"],
input[type="reset"] { font-family: var(--font-base); font-size: var(--fs-16); font-weight: var(--fw-medium); }

/* Links - Default link styling */
a { font-family: var(--font-base); }

/* Form Inputs - Default input styling */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
input[type="url"],
input[type="tel"],
input[type="number"],
textarea,
select { font-family: var(--font-base); font-size: var(--fs-16); font-weight: var(--fw-regular); }

/* Labels - Default label styling */
label { font-family: var(--font-base); font-size: var(--fs-14); font-weight: var(--fw-medium); }

/* Lists - Default list styling (same as paragraphs) */
ul, ol {
  font-family: var(--font-base);
  font-size: var(--fs-16);
  font-weight: var(--fw-regular);
  line-height: var(--lh-relaxed);
}

li {
  font-family: var(--font-base);
  font-size: var(--fs-16);
  font-weight: var(--fw-regular);
  line-height: var(--lh-relaxed);
}

/* Strong and emphasis */
strong, b { font-family: var(--font-base); font-weight: var(--fw-semibold); }
em, i { font-family: var(--font-base); font-style: italic; }

/* Code elements */
code, pre { font-family: var(--font-base); }

/* Blockquote */
blockquote { font-family: var(--font-base); }

/* ===================== */
/* Typography Classes */
/* ===================== */

/* Headings - Class versions */
.h1 { font-family: var(--font-base); font-size: var(--fs-62); line-height: var(--lh-tight); }
.h2 { font-family: var(--font-base); font-size: var(--fs-48); line-height: var(--lh-tight); }
.h3 { font-family: var(--font-base); font-size: var(--fs-40); line-height: var(--lh-tight); }
.h4 { font-family: var(--font-base); font-size: var(--fs-32); line-height: var(--lh-normal); }
.h5 { font-family: var(--font-base); font-size: var(--fs-26); line-height: var(--lh-normal); }
.h6 { font-family: var(--font-base); font-size: var(--fs-20); line-height: var(--lh-normal); }

/* Paragraphs: Big */
.paragraph-b-r { font-family: var(--font-base); font-size: var(--fs-18); font-weight: var(--fw-regular); line-height: var(--lh-relaxed); }
.paragraph-b-m { font-family: var(--font-base); font-size: var(--fs-18); font-weight: var(--fw-medium); line-height: var(--lh-relaxed); }
.paragraph-b-sb { font-family: var(--font-base); font-size: var(--fs-18); font-weight: var(--fw-semibold); line-height: var(--lh-relaxed); }
.paragraph-b-b { font-family: var(--font-base); font-size: var(--fs-18); font-weight: var(--fw-bold); line-height: var(--lh-relaxed); }

/* Paragraphs: Medium */
.paragraph-m-r { font-family: var(--font-base); font-size: var(--fs-16); font-weight: var(--fw-regular); line-height: var(--lh-relaxed); }
.paragraph-m-m { font-family: var(--font-base); font-size: var(--fs-16); font-weight: var(--fw-medium); line-height: var(--lh-relaxed); }
.paragraph-m-sb { font-family: var(--font-base); font-size: var(--fs-16); font-weight: var(--fw-semibold); line-height: var(--lh-relaxed); }
.paragraph-m-b { font-family: var(--font-base); font-size: var(--fs-16); font-weight: var(--fw-bold); line-height: var(--lh-relaxed); }

/* Paragraphs: Small */
.paragraph-s-r { font-family: var(--font-base); font-size: var(--fs-14); font-weight: var(--fw-regular); line-height: var(--lh-relaxed); }
.paragraph-s-m { font-family: var(--font-base); font-size: var(--fs-14); font-weight: var(--fw-medium); line-height: var(--lh-relaxed); }
.paragraph-s-sb { font-family: var(--font-base); font-size: var(--fs-14); font-weight: var(--fw-semibold); line-height: var(--lh-relaxed); }
.paragraph-s-b { font-family: var(--font-base); font-size: var(--fs-14); font-weight: var(--fw-bold); line-height: var(--lh-relaxed); }

/* Paragraphs: Extra Small */
.paragraph-p-r { font-family: var(--font-base); font-size: var(--fs-12); font-weight: var(--fw-regular); line-height: var(--lh-relaxed); }
.paragraph-p-m { font-family: var(--font-base); font-size: var(--fs-12); font-weight: var(--fw-medium); line-height: var(--lh-relaxed); }
.paragraph-p-sb { font-family: var(--font-base); font-size: var(--fs-12); font-weight: var(--fw-semibold); line-height: var(--lh-relaxed); }
.paragraph-p-b { font-family: var(--font-base); font-size: var(--fs-12); font-weight: var(--fw-bold); line-height: var(--lh-relaxed); }

/* Buttons */
.button-big { font-family: var(--font-base); font-size: var(--fs-18); font-weight: var(--fw-medium); }
.button-medium { font-family: var(--font-base); font-size: var(--fs-16); font-weight: var(--fw-medium); }
.button-small { font-family: var(--font-base); font-size: var(--fs-14); font-weight: var(--fw-medium); }

/* Form Inputs */
.input { font-family: var(--font-base); font-size: var(--fs-16); font-weight: var(--fw-regular); }
.label { font-family: var(--font-base); font-size: var(--fs-14); font-weight: var(--fw-medium); }

/* Chips */
.chips-m { font-family: var(--font-base); font-size: var(--fs-14); font-weight: var(--fw-medium); }

/* ===================== */
/* Hero Section Overrides */
/* ===================== */

/* Ensure Kirki typography color settings apply to hero section title */
/* This ensures the color from customizer (hero_section_title_typo) is applied */
.knowx-section-hero h1.entry-title {
	/* Color is controlled by Kirki customizer setting: hero_section_title_typo */
	/* The color will be applied via inline styles generated by Kirki */
}

/* ===================== */
/* Knowledge Base Overrides */
/* ===================== */

/* Category list links - set font weight to normal and font size */
.knowx-knowledgebase-one ul.cat-list li.cat-name a {
	font-weight: normal;
	font-size: 1.1rem;
}

/* Make all category items in the same row have equal height */
#knowx-categories-columns-three {
	align-items: stretch;
}

#knowx-categories-columns-three ul.cat-list {
	display: flex;
	flex-direction: column;
}

#knowx-categories-columns-three ul.cat-list li.cat-name {
	display: flex;
	flex-direction: column;
	flex: 1;
}

#knowx-categories-columns-three ul.cat-list li.cat-name h2 {
	display: flex;
	flex: 1;
	margin: 0;
}

#knowx-categories-columns-three ul.cat-list li.cat-name a {
	display: flex;
	align-items: center;
	justify-content: center;
	flex: 1;
}

/* Site header padding override */
.site-header-wrapper {
	padding-top: 15px;
	padding-bottom: 15px;
}

/* ===================== */
/* Article Content Area */
/* ===================== */

/* Set font size for all content in article content area */
.entry-content {
	font-size: var(--fs-18);
}

/* Apply font size to all text elements within article content */
.entry-content p,
.entry-content li,
.entry-content ul,
.entry-content ol,
.entry-content span,
.entry-content a,
.entry-content div,
.entry-content blockquote,
.entry-content code,
.entry-content pre {
	font-size: var(--fs-18);
}

/* Post box layout padding */
article.post-box-layout .knowx-post-content-wrapper {
	padding: 2em;
}

/* Entry title h2 font size */
.entry-header h2.entry-title,
.entry-layout .entry-header h2.entry-title,
article.entry .entry-header h2.entry-title {
	font-size: 26px;
}

/* Breadcrumbs spacing around separator */
#breadcrumbs span {
	margin-left: 2px;
	margin-right: 2px;
}

#breadcrumbs span:first-child {
	margin-left: 0;
}

#breadcrumbs span:last-child {
	margin-right: 0;
}

/* Post box layout hover effects */
article.post-box-layout {
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
}

/* Make the link cover the entire article */
article.post-box-layout .post-box-link {
  display: block;
  text-decoration: none;
  color: inherit;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  cursor: pointer;
}

/* Hover effect - apply to article when hovering over it or the link */
article.post-box-layout:hover {
  box-shadow:
      0 20px 40px rgba(0, 0, 0, 0.1),
      0 15px 12px rgba(0, 0, 0, 0.05);
}

/* Ensure content is above the link layer */
article.post-box-layout .knowx-post-content-wrapper {
  position: relative;
  z-index: 2;
  pointer-events: none;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Re-enable pointer events for interactive elements */
article.post-box-layout .knowx-post-content-wrapper a,
article.post-box-layout .knowx-post-content-wrapper button,
article.post-box-layout .knowx-post-content-wrapper input {
  pointer-events: auto;
  position: relative;
  z-index: 3;
}

.entry-header h1.entry-title,
.page-header .page-title {
  margin-bottom: 0;
}
.post-layout {
  margin: 2rem 0;
}

body.single main.site-main,
body.single-post main.site-main {
  margin: 2rem 0;
  padding: 2em;
}

/* Support button font size */
.knowx-support-button a {
  font-size: 15px;
}

/* Custom logo fixed size */
a.custom-logo-link .custom-logo {
  width: 53px;
  height: 53px;
  object-fit: contain;
}

/* Posted-on date icon */
.entry-meta .posted-on::before {
  content: "\f073";
  font-family: "FontAwesome";
  font-weight: normal;
  font-style: normal;
  margin-right: 0.5em;
}

/* Like/Dislike plugin styles */
.entry-content .ldppp_like-dislike {
  text-align: center;
  padding-top: 20px;
}

.entry-content .ldppp_like-dislike a[data-option],
.entry-content .ldppp_like-dislike button[data-option] {
  text-decoration: none;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  margin-right: 15px;
}

/* 404 Error Page - white background for content area */
body.error404.custom-background .site-wrapper,
body.error404 .site-wrapper {
  background-color: #ffffff;
}

body.error404.custom-background {
  background-color: #ffffff;
}

body.single-post .entry-content ol,
body.single-post .entry-content ul:not(.blocks-gallery-grid) {
  padding-right: 1.3em;
  padding-left: 1.3em;
}

/* ===================== */
/* Mobile Responsive Styles */
/* ===================== */

/* Mobile breakpoint: max-width 768px */
@media (max-width: 768px) {
  h1 {
    font-size: 36px;
  }

  article.post-box-layout .knowx-post-content-wrapper {
    padding: 1.5em 0.5em;
  }

  body.single-post .entry-content ol,
  body.single-post .entry-content ul:not(.blocks-gallery-grid) {
    padding-right: 0;
    padding-left: 0;
  }

  input[type="text"],
  input[type="email"] {
    width: 100%;
  }

}
