/*
Theme Name: codetraining
Author: Mark Kaufmann
Description: Custom theme for C++ training content
Version: 1.0
*/

/* ------------------------------
   SIDEBAR
------------------------------ */
.codetraining-sidebar ul {
  list-style: none;
  padding-left: 0;
}

.codetraining-sidebar li {
  margin: 4px 0;
}

.codetraining-sidebar a {
  text-decoration: none;
  padding: 6px 10px;
  display: block;
  font-size: 15px;
  line-height: 1.4;
}

.codetraining-sidebar .current_page_item > a {
  background: #eee;
  border-left: 3px solid #0073aa;
}

/* ------------------------------
   SLIDER FIXES
------------------------------ */
.wp-block-cb-carousel-v2,
.wp-block-cb-carousel-v2 .swiper,
.wp-block-cb-carousel-v2 .cb-wrapper {
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
}

main > *:first-child {
  margin-top: 0 !important;
}

div.wp-block-cover[style] {
  min-height: 300px !important;
  height: 300px !important;
  aspect-ratio: auto !important;
}

.wp-block-cb-carousel-v2 .wp-block-cover__image-background {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
}

.wp-block-cb-carousel-v2 .swiper-slide {
  height: 300px !important;
}

/* ------------------------------
   TYPOGRAPHY
------------------------------ */
main {
  font-family: "Segoe UI", sans-serif;
  line-height: 1.6;
  font-size: 16px;
  color: #222;
}

main p {
  margin-bottom: 1em;
}

main h1 {
  font-size: 2rem;
  margin-bottom: 0.5em;
  border-bottom: 2px solid #ddd;
  padding-bottom: 0.3em;
}

main h2 {
  font-size: 1.6rem;
  margin-top: 2em;
  margin-bottom: 0.5em;
  border-bottom: 1px solid #ccc;
  padding-bottom: 0.2em;
}

main h3 {
  font-size: 1.3rem;
  margin-top: 1.5em;
  margin-bottom: 0.5em;
}

main ul,
main ol {
  margin-left: 2em;
  margin-bottom: 1em;
}

main li {
  margin-bottom: 0.4em;
}

main code {
  background: #f4f4f4;
  padding: 2px 4px;
  border-radius: 4px;
  font-family: Consolas, monospace;
}

main pre {
  background: #f4f4f4;
  padding: 1em;
  border-radius: 4px;
  overflow-x: auto;
  font-family: Consolas, monospace;
}

.is-style-centered-block {
  max-width: 600px;
  margin: 0 auto;
}

/* ------------------------------
   HEADER IMAGE + OVERLAY
------------------------------ */

/* Header wrapper */
header.cpp-header {
  position: relative;
  width: 100%;
  height: 300px;
  overflow: hidden;
  display: block;
  z-index: 1;
}

/* Background image layer */
header.cpp-header .cpp-header-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  z-index: 1;
}

/* Overlay container */
header.cpp-header .cpp-header-overlay {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 2;
  text-align: right;
  color: white;
  text-shadow: 0 0 8px rgba(0,0,0,0.7);
}

/* Home link */
header.cpp-header .cpp-home-link {
  display: inline-block;
  margin-bottom: 10px;
  font-size: 16px;
  color: #fff;
  text-decoration: none;
  background: rgba(0,0,0,0.4);
  padding: 6px 12px;
  border-radius: 4px;
}

header.cpp-header .cpp-home-link:hover {
  text-decoration: underline;
}

/* Page title */
header.cpp-header .cpp-page-title {
  margin: 0;
  font-size: 32px;
  font-weight: bold;
  color: white;
  text-shadow: 0 2px 4px rgba(0,0,0,0.6);
}



.tutorial-footer-nav {
    display: flex;
    justify-content: center;   /* centers the arrows */
    gap: 40px;                 /* space between back/forward */
    margin-top: 60px;          /* space above the footer nav */
    padding: 20px 0;
    text-align: center;
}

.tutorial-footer-nav a {
    font-size: 1.1rem;
    text-decoration: none;
    color: #333;
    font-weight: 600;
}

.tutorial-footer-nav a:hover {
    text-decoration: underline;
}