/*
Theme Name: Ethical Hacking YouTube Theme
Theme URI: https://ethical.hacking.co
Author: Hacking.co
Author URI: https://ethical.hacking.co
Description: Professional cybersecurity education theme built around @CyberSecurityCourse YouTube channel. Features permanent dark mode styling, video integration, course management, and BetterDocs knowledge base styling.
Version: 3.0.5
Requires at least: 6.0
Tested up to: 6.4
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: ethicalhacking-youtube
Tags: dark-mode, video, education, one-column, custom-colors, custom-logo, custom-menu, featured-images, full-site-editing, block-patterns, block-styles

YouTube Channel: @CyberSecurityCourse
*/

/* Note: CSS components are enqueued via functions.php for better loading */

@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;600&family=Space+Grotesk:wght@400;500;600;700&display=swap');

/* ==========================================================================
   CRITICAL: OVERRIDE WORDPRESS DEFAULTS - MUST LOAD FIRST
   ========================================================================== */

/* Force remove all default WordPress padding */
html, body {
  margin: 0 !important;
  padding: 0 !important;
}

.wp-site-blocks {
  padding: 0 !important;
  margin: 0 !important;
}

.wp-site-blocks > * {
  margin-block-start: 0 !important;
  margin-block-end: 0 !important;
}

/* ==========================================================================
   BASE THEME STYLES
   ========================================================================== */

/* Dark theme foundation */
body {
  background-color: #0a0a0f !important;
  color: #e4e4e7 !important;
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
h4,
h5,
h6,
.wp-block-heading {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  letter-spacing: -0.015em;
}

/* ==========================================================================
   GLOBAL SPACING SYSTEM
   ========================================================================== */

/* Consistent vertical rhythm */
.ehc-section {
  padding-top: 80px;
  padding-bottom: 80px;
}

/* Column gaps */
.wp-block-columns {
  gap: 32px !important;
}

/* Card internal spacing */
.ehc-track-card,
.ehc-pricing-card,
.ehc-cert-card {
  padding: 32px !important;
}

/* List item spacing */
.ehc-track-card ul,
.wp-block-group ul {
  margin-top: 24px;
  margin-bottom: 24px;
}

.ehc-track-card li,
.wp-block-group li {
  padding: 10px 0;
  line-height: 1.6;
}

/* Button spacing */
.wp-block-buttons {
  margin-top: 24px;
}

.wp-block-button__link {
  padding: 14px 28px !important;
}

/* ==========================================================================
   HOMEPAGE SECTION SPACING (CRITICAL - v2.0.6)
   These styles MUST override any WordPress defaults
   ========================================================================== */

/* Force container full width and no padding */
.wp-site-blocks,
.entry-content,
.site-content,
.content-area {
  padding: 0 !important;
  margin: 0 !important;
  max-width: 100% !important;
}

/* Homepage wrapper */
.ehc-homepage {
  width: 100% !important;
  max-width: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
}

/* Hero section - generous spacing with higher specificity */
main.ehc-homepage .ehc-hero,
.ehc-homepage .ehc-hero.ehc-section,
.ehc-hero {
  padding-top: 100px !important;
  padding-bottom: 100px !important;
  padding-left: 60px !important;
  padding-right: 60px !important;
  min-height: 80vh !important;
  display: flex !important;
  align-items: center !important;
}

.ehc-hero .wp-block-columns,
.ehc-hero > .wp-block-columns {
  max-width: 1400px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  gap: 60px !important;
  width: 100% !important;
}

.ehc-hero h1 {
  font-size: 48px !important;
  line-height: 1.15 !important;
  margin-bottom: 24px !important;
  color: #f8fafc !important;
}

.ehc-hero p {
  font-size: 18px !important;
  line-height: 1.7 !important;
  margin-bottom: 32px !important;
  color: #e4e4e7 !important;
}

/* All content sections - consistent spacing with high specificity */
main.ehc-homepage .ehc-section,
main.ehc-homepage .ehc-latest-section,
main.ehc-homepage .ehc-courses-section,
main.ehc-homepage .ehc-cert-section,
main.ehc-homepage .ehc-kb-section,
.ehc-section,
.ehc-latest-section,
.ehc-courses-section,
.ehc-cert-section,
.ehc-kb-section {
  padding-top: 100px !important;
  padding-bottom: 100px !important;
  padding-left: 60px !important;
  padding-right: 60px !important;
}

/* Final CTA gets extra spacing */
main.ehc-homepage .ehc-final-cta,
.ehc-final-cta {
  padding-top: 120px !important;
  padding-bottom: 120px !important;
  padding-left: 60px !important;
  padding-right: 60px !important;
}

/* Section headings - stronger specificity */
.ehc-homepage .ehc-section h2,
.ehc-homepage h2.has-text-align-center,
.ehc-section h2,
.ehc-latest-section h2,
.ehc-courses-section h2,
.ehc-cert-section h2,
.ehc-kb-section h2 {
  font-size: 36px !important;
  margin-bottom: 16px !important;
  text-align: center !important;
  color: #f8fafc !important;
}

/* Section descriptions - stronger specificity */
.ehc-homepage .ehc-section > p.has-text-align-center,
.ehc-section > p.has-text-align-center,
.ehc-latest-section > p,
.ehc-courses-section > p,
.ehc-cert-section > p,
.ehc-kb-section > p,
p.has-text-align-center {
  margin-bottom: 48px !important;
  font-size: 18px !important;
  color: #9ca3af !important;
}

/* Card columns with proper gaps - stronger specificity */
.ehc-homepage .wp-block-columns,
.ehc-courses-section .wp-block-columns,
.ehc-cert-section .wp-block-columns,
.wp-block-columns {
  max-width: 1400px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  gap: 32px !important;
}

/* Track cards - internal spacing with higher specificity */
.ehc-homepage .ehc-track-card,
.ehc-track-card,
.wp-block-group.ehc-track-card {
  padding: 32px !important;
  border-radius: 16px !important;
  height: 100% !important;
  background-color: #1e293b !important;
}

.ehc-track-card h3 {
  font-size: 24px !important;
  margin-top: 16px !important;
  margin-bottom: 12px !important;
  color: #f8fafc !important;
}

.ehc-track-card p {
  margin-bottom: 20px !important;
  line-height: 1.6 !important;
  color: #9ca3af !important;
}

.ehc-track-card ul {
  margin: 24px 0 !important;
  padding-left: 0 !important;
  list-style: none !important;
}

.ehc-track-card li {
  padding: 12px 0 !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
  font-size: 15px !important;
  color: #e4e4e7 !important;
}

.ehc-track-card li:last-child {
  border-bottom: none !important;
}

/* Certification cards - higher specificity */
.ehc-cert-section .wp-block-group,
.ehc-homepage .ehc-cert-section .wp-block-group {
  padding: 32px !important;
  border-radius: 16px !important;
  background-color: rgba(15, 23, 42, 0.5) !important;
}

.ehc-cert-section h3 {
  font-size: 22px !important;
  margin-bottom: 12px !important;
  color: #f8fafc !important;
}

.ehc-cert-section .wp-block-group p {
  margin-bottom: 24px !important;
  color: #9ca3af !important;
}

/* Final CTA section headings */
.ehc-final-cta h2 {
  font-size: 42px !important;
  margin-bottom: 20px !important;
  color: #ffffff !important;
}

.ehc-final-cta p {
  font-size: 20px !important;
  margin-bottom: 40px !important;
  color: #e4e4e7 !important;
}

/* Featured video info spacing */
.ehc-featured-video .ehc-video-info {
  margin-top: 20px !important;
  padding: 0 4px !important;
}

.ehc-featured-video .ehc-video-info p {
  margin-bottom: 4px !important;
}

/* Video wrapper styling */
.ehc-video-wrapper {
  border-radius: 16px !important;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5) !important;
}

/* Button spacing and sizing */
.ehc-hero .wp-block-buttons {
  margin-top: 32px !important;
  gap: 16px !important;
}

.ehc-hero .wp-block-button__link {
  padding: 16px 32px !important;
  font-size: 16px !important;
  font-weight: 600 !important;
}

/* Knowledge base section */
.ehc-kb-section .wp-block-buttons {
  margin-top: 0 !important;
}

.ehc-kb-section .wp-block-button__link {
  padding: 16px 32px !important;
}

/* Mobile responsive adjustments */
@media screen and (max-width: 991px) {
  .ehc-hero,
  .ehc-section,
  .ehc-latest-section,
  .ehc-courses-section,
  .ehc-cert-section,
  .ehc-kb-section {
    padding: 60px 24px !important;
  }

  .ehc-final-cta {
    padding: 80px 24px !important;
  }

  .ehc-hero h1 {
    font-size: 32px !important;
  }

  .ehc-section h2,
  .ehc-latest-section h2,
  .ehc-courses-section h2,
  .ehc-cert-section h2,
  .ehc-kb-section h2 {
    font-size: 28px !important;
  }

  .ehc-final-cta h2 {
    font-size: 32px !important;
  }

  .ehc-courses-section .wp-block-columns,
  .ehc-cert-section .wp-block-columns {
    gap: 24px !important;
  }
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  color: var(--ehc-text-primary, #f8fafc);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

h1 {
  font-size: clamp(32px, 5vw, 56px);
  margin-bottom: 24px;
}

h2 {
  font-size: clamp(28px, 4vw, 42px);
  margin-bottom: 16px;
}

h3 {
  font-size: clamp(20px, 3vw, 28px);
  margin-bottom: 12px;
}

p {
  margin-bottom: 16px;
  line-height: 1.7;
}

a {
  color: var(--ehc-accent-light, #818cf8);
  text-decoration: none;
  transition: color var(--ehc-transition-fast, 150ms ease);
}

a:hover {
  color: var(--ehc-accent, #6366f1);
  text-decoration: underline;
}

/* Content container */
.site-content,
.content-area {
  background-color: var(--ehc-bg-primary, #0a0a0f);
}

/* ==========================================================================
   BETTERDOCS INTEGRATION
   ========================================================================== */

/* Doc pages */
body.single-docs {
  background-color: var(--ehc-bg-primary, #0a0a0f);
}

body.single-docs article {
  background-color: var(--ehc-bg-primary, #0a0a0f);
}

/* Entry content */
.betterdocs-entry-content,
.betterdocs-content {
  color: var(--ehc-text-secondary, #e4e4e7);
}

.betterdocs-entry-content h1,
.betterdocs-entry-content h2,
.betterdocs-entry-content h3,
.betterdocs-entry-content h4 {
  color: var(--ehc-text-primary, #f8fafc);
}

/* Code blocks */
.betterdocs-entry-content pre {
  background-color: var(--ehc-bg-secondary, #1e293b);
  border: 1px solid var(--ehc-border-accent, rgba(99, 102, 241, 0.3));
  border-radius: var(--ehc-radius-lg, 12px);
  padding: var(--ehc-spacing-lg, 24px);
  overflow-x: auto;
}

.betterdocs-entry-content code {
  background-color: rgba(99, 102, 241, 0.15);
  color: #a5b4fc;
  padding: 2px 6px;
  border-radius: var(--ehc-radius-sm, 4px);
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
}

.betterdocs-entry-content pre code {
  background: transparent;
  color: var(--ehc-text-secondary, #e4e4e7);
  padding: 0;
}

/* ==========================================================================
   UTILITY CLASSES
   ========================================================================== */

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: var(--ehc-spacing-xs); }
.mt-2 { margin-top: var(--ehc-spacing-sm); }
.mt-3 { margin-top: var(--ehc-spacing-md); }
.mt-4 { margin-top: var(--ehc-spacing-lg); }
.mt-5 { margin-top: var(--ehc-spacing-xl); }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: var(--ehc-spacing-xs); }
.mb-2 { margin-bottom: var(--ehc-spacing-sm); }
.mb-3 { margin-bottom: var(--ehc-spacing-md); }
.mb-4 { margin-bottom: var(--ehc-spacing-lg); }
.mb-5 { margin-bottom: var(--ehc-spacing-xl); }

.hidden { display: none; }
.visible { display: block; }

/* Screen reader only */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ==========================================================================
   INLINE VIDEO PLAYER - All videos play on-site
   ========================================================================== */

/* Clickable video cards */
.ehc-inline-player {
  cursor: pointer !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease !important;
  user-select: none;
}

.ehc-inline-player:hover {
  transform: translateY(-6px) !important;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4) !important;
}

.ehc-inline-player:focus {
  outline: 3px solid #6366f1 !important;
  outline-offset: 4px !important;
}

.ehc-inline-player:active {
  transform: translateY(-2px) !important;
}

/* Video card thumbnail styling */
.ehc-video-card .ehc-thumbnail {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
}

.ehc-video-card .ehc-thumbnail img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.3s ease;
}

.ehc-inline-player:hover .ehc-thumbnail img {
  transform: scale(1.05);
}

/* Play button overlay */
.ehc-video-card .ehc-play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 68px;
  height: 48px;
  background: rgba(255, 0, 0, 0.9);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0;
  opacity: 0;
  transition: all 0.2s ease;
}

.ehc-video-card .ehc-play-btn::before {
  content: '';
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 10px 0 10px 18px;
  border-color: transparent transparent transparent white;
  margin-left: 4px;
}

.ehc-inline-player:hover .ehc-play-btn {
  opacity: 1;
}

/* Video duration badge */
.ehc-video-card .ehc-duration {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.85);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 6px;
  border-radius: 4px;
}

/* Video title */
.ehc-video-card .ehc-video-title {
  font-size: 15px;
  font-weight: 500;
  color: #f8fafc;
  margin: 12px 0 4px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Video metadata */
.ehc-video-card .ehc-video-meta,
.ehc-video-card .ehc-video-date {
  font-size: 13px;
  color: #9ca3af;
}

/* Video grid layout */
.ehc-video-grid {
  display: grid;
  gap: 24px;
}

.ehc-video-grid.ehc-cols-3 {
  grid-template-columns: repeat(3, 1fr);
}

.ehc-video-grid.ehc-cols-2 {
  grid-template-columns: repeat(2, 1fr);
}

@media (max-width: 991px) {
  .ehc-video-grid.ehc-cols-3,
  .ehc-video-grid.ehc-cols-2 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .ehc-video-grid.ehc-cols-3,
  .ehc-video-grid.ehc-cols-2 {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   KADENCE-COMPATIBLE KB- PREFIX STYLES (v3.0.0)
   Maps to theme-palette colors defined in theme.json
   ========================================================================== */

/*
   Color Palette Reference:
   --wp--preset--color--theme-palette-1: #00ff88 (Cyber Green - Primary)
   --wp--preset--color--theme-palette-2: #3b82f6 (Tech Blue - Secondary)
   --wp--preset--color--theme-palette-3: #6366f1 (Indigo - Accent)
   --wp--preset--color--theme-palette-4: #ff0000 (YouTube Red)
   --wp--preset--color--theme-palette-5: #f59e0b (Warning Amber)
   --wp--preset--color--theme-palette-6: #0a0a0f (Background Dark)
   --wp--preset--color--theme-palette-7: #12121a (Surface Dark)
   --wp--preset--color--theme-palette-8: #1e293b (Surface Elevated)
   --wp--preset--color--theme-palette-9: #f8fafc (Text Primary)
*/

/* Main content wrapper */
.kb-main-content,
.kb-homepage {
  width: 100%;
  max-width: 100%;
  padding: 0;
  margin: 0;
}

/* Hero sections */
.kb-hero {
  padding: 80px 40px !important;
  min-height: 70vh;
  display: flex;
  align-items: center;
}

.kb-hero h1 {
  font-size: clamp(2rem, 5vw, 3.5rem) !important;
  line-height: 1.15 !important;
  margin-bottom: 1.5rem !important;
}

.kb-hero p {
  font-size: 1.125rem !important;
  line-height: 1.7 !important;
  margin-bottom: 2rem !important;
}

/* Content sections */
.kb-section {
  padding: 80px 40px !important;
}

.kb-section h2 {
  font-size: clamp(1.75rem, 4vw, 2.5rem) !important;
  margin-bottom: 1rem !important;
}

/* Cards */
.kb-post-card,
.kb-course-card,
.kb-doc-card {
  border-radius: 12px !important;
  padding: 1.5rem !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease !important;
}

.kb-post-card:hover,
.kb-course-card:hover,
.kb-doc-card:hover {
  transform: translateY(-4px) !important;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3) !important;
}

.kb-post-card h3,
.kb-course-card h3,
.kb-doc-card h3 {
  font-size: 1.125rem !important;
  font-weight: 600 !important;
  margin-bottom: 0.5rem !important;
}

/* Two-column layouts */
.kb-sidebar-column {
  position: sticky;
  top: 2rem;
  align-self: flex-start;
}

.kb-content-column {
  flex: 1;
  min-width: 0;
}

/* Sidebar */
.kb-sidebar {
  position: sticky;
  top: 2rem;
}

.kb-sidebar-cta {
  margin-top: 1.5rem;
}

/* Article styles */
.kb-article-header {
  margin-bottom: 2rem;
}

.kb-article-content {
  line-height: 1.8;
}

.kb-article-content h2 {
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}

.kb-article-content h3 {
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.kb-article-content p {
  margin-bottom: 1.25rem;
}

.kb-article-content pre {
  background-color: var(--wp--preset--color--theme-palette-8, #1e293b) !important;
  border-radius: 8px;
  padding: 1.5rem;
  overflow-x: auto;
  margin: 1.5rem 0;
}

.kb-article-content code {
  background-color: rgba(99, 102, 241, 0.15);
  color: #a5b4fc;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 0.875em;
}

.kb-article-content pre code {
  background: transparent;
  padding: 0;
  color: inherit;
}

.kb-article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  font-size: 0.875rem;
}

.kb-article-tags {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Taxonomy archives */
.kb-taxonomy-archive {
  padding: 0;
}

.kb-taxonomy-hero {
  padding: 3rem 2rem !important;
}

.kb-taxonomy-label {
  font-size: 0.875rem !important;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem !important;
}

/* Single post/doc layouts */
.kb-single-post,
.kb-single-content,
.kb-docs-single {
  padding: 2rem;
}

.kb-single-content {
  border-radius: 12px;
}

/* Breadcrumbs */
.kb-breadcrumb-wrap {
  margin-bottom: 1.5rem;
  font-size: 0.875rem;
}

.kb-breadcrumb-wrap a {
  color: var(--wp--preset--color--theme-palette-1, #00ff88) !important;
  text-decoration: none;
}

.kb-breadcrumb-wrap a:hover {
  text-decoration: underline;
}

/* Footer CTA */
.kb-footer-cta {
  margin-top: 2rem;
  padding: 2rem;
  border-radius: 12px;
  text-align: center;
}

/* Pricing section */
.kb-pricing {
  padding: 4rem 2rem;
}

.kb-pricing-card {
  border-radius: 16px !important;
  padding: 2rem !important;
  text-align: center;
  transition: transform 0.2s ease !important;
}

.kb-pricing-card:hover {
  transform: translateY(-8px) !important;
}

.kb-pricing-card.kb-featured {
  transform: scale(1.05);
  border: 2px solid var(--wp--preset--color--theme-palette-1, #00ff88);
}

.kb-pricing-card.kb-featured:hover {
  transform: scale(1.05) translateY(-8px) !important;
}

/* Related articles */
.kb-related-articles {
  margin-top: 2rem;
}

.kb-related-articles h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

/* Docs archive */
.kb-docs-archive {
  padding: 2rem 2rem 4rem;
}

.kb-docs-header {
  margin-bottom: 3rem;
}

/* Cover block enhancements */
.kb-courses-hero.wp-block-cover {
  min-height: 400px !important;
}

.kb-courses-hero .wp-block-cover__inner-container {
  max-width: 1200px;
  margin: 0 auto;
}

/* Entry content styling */
.kb-entry-content {
  line-height: 1.8;
}

.kb-entry-content > *:first-child {
  margin-top: 0;
}

.kb-entry-content > *:last-child {
  margin-bottom: 0;
}

/* Level archive */
.kb-level-archive .kb-taxonomy-label {
  color: var(--wp--preset--color--theme-palette-2, #3b82f6) !important;
}

/* Topic archive */
.kb-topic-archive .kb-taxonomy-label {
  color: var(--wp--preset--color--theme-palette-1, #00ff88) !important;
}

/* Latest posts block styling in kb context */
.kb-sidebar .wp-block-latest-posts {
  padding: 0;
  margin: 0;
  list-style: none;
}

.kb-sidebar .wp-block-latest-posts li {
  margin-bottom: 0.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.kb-sidebar .wp-block-latest-posts li:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.kb-sidebar .wp-block-latest-posts a {
  color: var(--wp--preset--color--theme-palette-9, #f8fafc) !important;
  text-decoration: none;
  transition: color 0.15s ease;
}

.kb-sidebar .wp-block-latest-posts a:hover {
  color: var(--wp--preset--color--theme-palette-1, #00ff88) !important;
}

/* Query loop card grids */
.kb-taxonomy-archive .wp-block-post-template {
  gap: 1.5rem !important;
}

/* Button variations */
.kb-main-content .wp-block-button.is-style-outline .wp-block-button__link {
  border: 2px solid currentColor !important;
  background: transparent !important;
}

/* Responsive adjustments for kb- classes */
@media screen and (max-width: 991px) {
  .kb-hero {
    padding: 60px 24px !important;
    min-height: auto;
  }

  .kb-section {
    padding: 60px 24px !important;
  }

  .kb-sidebar-column {
    position: relative;
    top: 0;
  }

  .kb-pricing-card.kb-featured {
    transform: scale(1);
  }

  .kb-pricing-card.kb-featured:hover {
    transform: translateY(-8px) !important;
  }
}

@media screen and (max-width: 600px) {
  .kb-hero {
    padding: 40px 16px !important;
  }

  .kb-section {
    padding: 40px 16px !important;
  }

  .kb-post-card,
  .kb-course-card,
  .kb-doc-card {
    padding: 1rem !important;
  }

  .kb-taxonomy-hero {
    padding: 2rem 1rem !important;
  }

  .kb-single-content {
    padding: 1.5rem;
  }
}

/* ==========================================================================
   ENHANCED HOMEPAGE & COURSES STYLES (v3.0.1)
   ========================================================================== */

/* Gradient text effect */
h1 span[style*="background: linear-gradient"] {
  background-clip: text !important;
  -webkit-background-clip: text !important;
}

/* Featured video badge */
.kb-badge {
  display: inline-block;
  padding: 4px 10px;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: 4px;
  margin-bottom: 0.5rem;
}

.kb-badge-featured {
  background: linear-gradient(135deg, #ef4444 0%, #f97316 100%);
  color: #fff;
}

/* Video wrapper styling */
.kb-video-wrapper {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.kb-video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.kb-video-meta {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.kb-video-meta strong {
  color: var(--wp--preset--color--theme-palette-9, #f8fafc);
  font-size: 1rem;
}

.kb-video-meta span {
  color: var(--wp--preset--color--theme-palette-9, #94a3b8);
  font-size: 0.875rem;
  opacity: 0.8;
}

/* Hero video wrap */
.kb-hero-video-wrap {
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5);
}

/* Feature cards */
.kb-feature-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  height: 100%;
}

.kb-feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

/* Track cards */
.kb-track-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  height: 100%;
}

.kb-track-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.3);
}

/* Checklist styling */
.kb-checklist {
  list-style: none !important;
  padding-left: 0 !important;
  margin: 0;
}

.kb-checklist li {
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--wp--preset--color--theme-palette-9, #e4e4e7);
}

.kb-checklist li:last-child {
  border-bottom: none;
}

/* Certification cards */
.kb-cert-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  height: 100%;
}

.kb-cert-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}

/* Path cards (courses page) */
.kb-path-card {
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  cursor: pointer;
}

.kb-path-card:hover {
  transform: translateX(4px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}

/* Featured course card */
.kb-featured-card {
  transition: box-shadow 0.2s ease;
}

.kb-featured-card:hover {
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

/* Pulse animation for CTA buttons */
@keyframes kb-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 0, 0, 0.4);
  }
  70% {
    box-shadow: 0 0 0 15px rgba(255, 0, 0, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255, 0, 0, 0);
  }
}

.kb-pulse-btn .wp-block-button__link {
  animation: kb-pulse 2s infinite;
}

.kb-pulse-btn .wp-block-button__link:hover {
  animation: none;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(255, 0, 0, 0.4);
}

/* Hero stats */
.kb-hero-stats p {
  margin: 0 !important;
}

/* Course stats */
.kb-course-stats p {
  margin: 0 !important;
  text-align: center;
}

/* CTA section overlay enhancement */
.kb-cta-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(ellipse at center, rgba(99, 102, 241, 0.15) 0%, transparent 70%);
  pointer-events: none;
}

/* Featured course section */
.kb-featured-course .kb-video-wrapper {
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.3);
}

/* Learning paths section */
.kb-learning-paths h2 {
  color: var(--wp--preset--color--theme-palette-9, #f8fafc);
}

/* Responsive enhancements */
@media screen and (max-width: 991px) {
  .kb-hero-stats {
    justify-content: center !important;
  }

  .kb-hero-stats > .wp-block-group {
    padding: 0.75rem 1rem !important;
    border-left: none !important;
    border-top: 1px solid #334155;
    margin-top: 0.75rem;
  }

  .kb-hero-stats > .wp-block-group:first-child {
    border-top: none;
    margin-top: 0;
  }

  .kb-path-card {
    margin-bottom: 0.75rem;
  }

  .kb-track-card {
    margin-bottom: 1.5rem;
  }
}

@media screen and (max-width: 600px) {
  .kb-video-wrapper {
    border-radius: 8px;
  }

  .kb-hero-video-wrap {
    margin-top: 2rem;
  }

  .kb-featured-card .wp-block-columns {
    flex-direction: column !important;
  }

  .kb-featured-card .wp-block-column {
    flex-basis: 100% !important;
    width: 100% !important;
  }
}
