/**
Theme Name: TOP eMarketer Patched 1.0.6
Author: Serwis4U
Author URI: https://serwis4u.com
Description: Motyw potomny Astra / LearnDash — TOP eMarketer Patched 1.0.6, poprawka UX menu kursu, rozwijanie aktualnej sekcji i tekstowy pasek „Jesteś tutaj” tylko na topicach.
Version: 1.0.6
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: top-emarketer-patched-1-0-6
Template: astra
*/
/*
Let's see an example of some common font sizes expressed in rem units, assuming, of course, that the base size is 16px:

    10px = 0.625rem.
    12px = 0.75rem.
    14px = 0.875rem.
    16px = 1rem (base)
    18px = 1.125rem.
    20px = 1.25rem.
    24px = 1.5rem.
    30px = 1.875rem
*/

/* Dark Mode Variables */
:root {
  /* Light mode colors */
  --color-bg: #ffffff;
  --color-content-bg: #F8F7F5;
  --color-text: rgb(32, 33, 36);
  --color-primary: #3a3a3a;
  --color-secondary-bg: #e2e7ed;
  --color-accent: #F8D481;
  --color-border: rgb(228, 228, 228);
}

html.dark-mode {
  /* Dark mode overrides */
  --color-bg: #1a1a1a;
  --color-content-bg: #2a2a2a;
  --color-text: #eeeeee;
  --color-primary: #bbbbbb;
  --color-secondary-bg: #444444;
  --color-accent: #AA9930;
  --color-border: #555555;
}

/* Global usage */
body {
	font-size: 0.875rem;
	font-family: "Roboto", "Helvetica", "Arial", sans-serif;
	font-weight: 400;
	line-height: 1.43;
	letter-spacing: 0px;
	color: var(--color-text);
	background-color: var(--color-bg);
}

#content {
	background-color: var(--color-content-bg) !important;
}

/* LearnDash video wrapper */
.ld-tabs-content .ld-visible {
	width: 100%;
	position: relative;
	padding-top: 56.25%;
	display: block;
}
.ld-visible iframe {
	width: 100% !important;
	margin-bottom: 50px;
	clear: both;
	border-radius: 10px;
}

.learndash-wrapper .ld-tabs {
  margin: -25px 0 0 0;
}

.learndash-wrapper p {
  padding: 2px 20px 0 20px !important;
}

/* Navigation */
.main-navigation ul li a:hover,
.main-navigation ul li.current-menu-item > a,
.main-navigation ul li.current-page-item > a,
.main-navigation ul li.current_page_item > a {
    font-weight: 700 !important;
}
.main-navigation ul li.current-page-item {
	border: 2px solid var(--color-content-bg) !important;
}
.main-navigation > ul > li {
    line-height: 74px !important;
	text-align: left !important;
	display: inline-block !important;
	font-size: 18px !important;
}

/* "Twoje Kursy" page bg */
#post-163 {
	background-color: var(--color-content-bg) !important;
	border: none !important;
}

/* Page spacing */
#primary {
    margin: 0 !important;
	padding: 40px 0 72px 0 !important;
	width: 100%;
}

@media only screen and (min-width: 992px) {
	.post-163 {
		 padding: 1.34em 6.67em !important;
	}
	.type-sfwd-topic, .type-sfwd-lessons {
     padding: 0px 0px !important;
	}
	#secondary {
    width: 40% !important;
}
}

.aktywne-kursy {
    padding-top: 0 !important;
}

.ast-separate-container .ast-article-single:not(.ast-related-post) {
    background-color: var(--color-bg);
	opacity: 1;
	overflow: hidden;
	border: 1px solid var(--color-border);
	border-radius: 10px;
}

.entry-content h2 {
    font-weight: 700 !important;
    font-style: normal !important;
    font-size: 21px !important;
	line-height: 33px !important;
	padding: 2px 20px 0 20px;
	color: var(--color-text);
}

.single .sfwd-topic .entry-header {
  margin-bottom: 2em;
}

.entry-content h4 {
  padding: 20px;
}

.learndash-wrapper a {
  padding: 20px;
}

/* Breadcrumbs */
.ld-breadcrumbs-segments span a:hover {
    opacity: .75 !important;
}

/* Buttons and statuses */
.learndash-wrapper .ld-status,
.learndash-wrapper #learndash_mark_complete_button,
.learndash-wrapper .learndash_mark_complete_button {
    border-radius: 6px !important;
    background: var(--color-primary) !important;
    border: 1px solid var(--color-primary) !important;
}

/* Sidebar */
#secondary {
    margin: 40px 0 2.5em !important;
	max-width: 360px;
	min-width: 274px;
}

.learndash-wrapper .ld-secondary-color-hover:hover,
.learndash-wrapper .ld-secondary-color,
.learndash-wrapper .ld-focus .ld-focus-header .sfwd-mark-complete .learndash_mark_complete_button,
.learndash-wrapper .ld-focus-comments__heading-actions .ld-expand-button,
.learndash-wrapper .ld-focus-comments__heading a,
.learndash-wrapper .ld-focus-comment .ld-comment-reply a.comment-reply-link:hover {
    color: var(--color-primary) !important;
}

.learndash-wrapper .ld-progress .ld-progress-bar {
    background-color: var(--color-secondary-bg) !important;
	flex-direction: column;
}

#learndash-tooltips .ld-tooltip::after,
#learndash-tooltips .ld-tooltip,
.learndash-wrapper .ld-primary-background,
.learndash-wrapper .btn-join,
.learndash-wrapper #btn-join,
.learndash-wrapper .ld-expand-button,
.learndash-wrapper .wpProQuiz_content .wpProQuiz_button:not(.wpProQuiz_button_reShowQuestion):not(.wpProQuiz_button_restartQuiz),
.learndash-wrapper .wpProQuiz_content .wpProQuiz_button2,
.learndash-wrapper .ld-focus .ld-focus-sidebar .ld-course-navigation-heading,
.learndash-wrapper .ld-focus .ld-focus-sidebar .ld-focus-sidebar-trigger,
.learndash-wrapper .ld-focus-comments .form-submit #submit,
.learndash-wrapper .ld-login-modal input[type="submit"],
.learndash-wrapper .ld-login-modal .ld-login-modal-register,
.learndash-wrapper .wpProQuiz_content .wpProQuiz_certificate a.btn-blue,
.learndash-wrapper .ld-focus .ld-focus-header .ld-user-menu .ld-user-menu-items a,
#wpProQuiz_user_content table.wp-list-table thead th,
#wpProQuiz_overlay_close,
.learndash-wrapper .ld-expand-button.ld-button-alternate .ld-icon {
    background-color: var(--color-primary) !important;
}

.learndash-wrapper #quiz_continue_link,
.learndash-wrapper .ld-secondary-background,
.learndash-wrapper .ld-status-complete,
.learndash-wrapper .ld-alert-success .ld-alert-icon {
    background-color: var(--color-primary) !important;
}

/* Course Grid Cards */
.ld-course-list-items .ld_course_grid .thumbnail.course {
    display: flex !important;
    flex-direction: column !important;
	min-height: 250px !important;
    height: 100% !important;
	border: 1px solid var(--color-content-bg) !important;
	border-radius: 6px !important;
	box-shadow: 0 2px 3px -1px rgba(50,50,50,.3);
	padding-bottom:10px;
    background-color: var(--color-bg) !important;
}
.ld-course-list-items .ld_course_grid .thumbnail.course img {
	height: 160px !important;
	background-size: cover !important;
	border-radius: 6px 6px 0 0 !important;
}

.ld-course-list-items .ld_course_grid .thumbnail.course img:hover {
	opacity: 0.5 !important;
}

.ld-course-list-items .ld_course_grid {
	text-align: center !important;
	margin: 0 !important;
	font-size: 1rem !important;
	font-weight: 700 !important; 				 
}

.ld-course-list-items .ld_course_grid {
  margin-bottom: 20px !important;
}

.ld_course_grid .entry-title {
	font-family: "Roboto", "Helvetica", "Arial", sans-serif;
	font-weight: bold;
	font-size: 23px !important;
	line-height: 1.5;
	color: var(--color-text);
}

.entry-header h1 {
	font-family: "Roboto", "Helvetica", "Arial", sans-serif;
	font-weight: bold;
	font-size: 23px !important;
	line-height: 1.5;
	padding: 26px 32px 6px;
	color: var(--color-text);
}

/* Hide price ribbons */
body .ld-course-list-items .ld_course_grid .thumbnail.course .ld_course_grid_price,
.ast-single-post-order {
	display: none;
}

/* Course Grid buttons */
.ld-course-list-items .ld_course_grid .btn-primary {
	background: none !important;
    border: 1px solid var(--color-primary) !important;
	color: var(--color-primary) !important;
}
.ld_course_grid_button {
	padding: 10px 0 !important;
}
.ld-course-list-items .ld_course_grid .btn-primary:hover,
.login-submit input[type="submit"]:hover,
.submit input[type="submit"]:hover {
	background: var(--color-primary) !important;
	color: var(--color-bg) !important;
}
.ld-course-list-items .ld_course_grid .ld-secondary-color {
	color: var(--color-primary) !important;
	font-weight: 400 !important;
}

.ld-breadcrumbs {
	color: var(--color-primary) !important;
	font-weight: 700 !important;
}

.ld-progress .ld-progress-bar .ld-progress-bar-percentage {
    background: var(--color-primary) !important;
	font-weight: 400 !important;
}

.ld-progress-label, .ld-progress-percentage {
    text-transform: uppercase;
    font-weight: 400 !important;
}

.widget_course_return, .learndash-wrapper .ld-content-actions .ld-content-action .ld-course-step-back,
.learndash-wrapper .ld-course-navigation .ld-course-navigation-actions .ld-home-link,
.ld-lesson-status {
    display: none !important;
}

.ld-course-navigation .ld-lesson-item-expanded,
.learndash-wrapper .ld-topic-status,
.learndash-wrapper .ld-lesson-status {
    background: transparent !important;
}

.learndash-wrapper .ld-breadcrumbs {
	display: none !important;
}

#text-2 {
	display: flex;
  flex-direction: column;
  margin-bottom: 24px;
  font-family: "Roboto", "Helvetica", "Arial", sans-serif;
  font-weight: 500;
  font-size: 18px;
  line-height: 1.5;
}

.ld-status-complete {
    background-color: #019e7c !important;
}

.ld-course-navigation .ld-status-icon.ld-status-incomplete {
	visibility: hidden !important;
}

/* Login form styles */
.post-211, .post-6282 {
	background: var(--color-secondary-bg) !important;
	margin: 0 !important;
}

#formlogin1, #lostpasswordform_1 {
	width: 100% !important;
	margin: 0 auto;
}
#formlogin1 p, #lostpasswordform_1 p {
	text-align: center !important;
}

#formlogin1 input[type=email],
#formlogin1 input[type=text],
#formlogin1 input[type=password] {
	width: 70% !important;
	background: var(--color-bg) !important;
}

.cvNfDm {
  justify-content: center;
  align-items: center;
  height: 100%;
  display: flex;
}
.cslpsn {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 32px;
  width: 550px;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  background: var(--color-bg);
}

.login-submit {
	display: block !important;
	width: 100% !important;
}

.login-submit input[type="submit"], .submit input[type="submit"] {
	color: var(--color-text);
	font-weight: bold;
	height: auto;
	padding: 12px 24px;
	border-radius: 4px;
	text-transform: uppercase;
	background-color: var(--color-accent);
	width: 100% !important;
}

#formlogin1 input[type=email]:focus,
#formlogin1 input[type=text]:focus,
#formlogin1 input[type=password]:focus {
    border-color: var(--color-bg) !important;
}

.ld-is-current-item, .ld-is-current-item:hover {
	border-radius: 10px;
	background-color: rgb(250, 227, 172) !important;
	font-weight: 500 !important;
}

.ld-primary-color-hover:hover {
	background: var(--color-border) !important;
	border-radius: 10px;
}

.ld-content-actions .ld-content-action .ld-button,
.learndash-wrapper .ld-button:not(.ld-button-reverse):not(.ld-button-transparent),
.learndash-wrapper #learndash_mark_complete_button,
.learndash-wrapper .learndash_mark_complete_button {
	background: var(--color-bg) !important;
	border: 1px solid var(--color-border) !important;
	/*color: var(--color-text) !important;*/
	border-radius: 10px !important;
	padding: 20px;
}

.learndash-wrapper .ld-button:hover:not(.learndash-link-previous-incomplete):not(.ld-button-transparent),
.learndash-wrapper .learndash_mark_complete_button:hover {
	color: var(--color-text) !important;
	border-color: var(--color-text) !important;
}

.ld-lesson-item-expanded {
	margin-left: 0 !important;
}
.ld-topic-title,
.ld-lesson-title {
	font-size: 16px;
	color: var(--color-text) !important;
}

.learndash_post_sfwd-topic .learndash-wrapper .ld-content-action:first-child .ld-button,
.learndash_post_sfwd-topic .learndash-wrapper .ld-content-action:last-child .ld-button,
.learndash_post_sfwd-lessons .learndash-wrapper .ld-content-action:first-child .ld-button,
.learndash_post_sfwd-lessons .learndash-wrapper .ld-content-action:last-child .ld-button,
.ld-button  {
	background-color: transparent !important;
	color: var(--color-text) !important;
}

.learndash-wrapper .ld-expand-button.ld-button-alternate .ld-text {
  color: var(--color-text) !important;
  font-weight: 500 !important;
}
.learndash-wrapper .ld-course-navigation .ld-lesson-item-expanded::before {
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 8px solid var(--color-text);
  content: "";
  display: block;
  height: 0;
  left: 50px;
  position: absolute;
  top: 0;
  width: 0;
}


/* Additional first-child lesson button overrides */
.learndash_post_sfwd-lessons .learndash-wrapper .ld-content-action:first-child .ld-button:not(.ld-button-reverse):not(.learndash-link-previous-incomplete):not(.ld-button-transparent) {
    background-color: var(--color-bg) !important;
}
.learndash_post_sfwd-lessons .learndash-wrapper .ld-content-action:first-child .ld-button:not(.ld-button-reverse):not(.learndash-link-previous-incomplete):not(.ld-button-transparent) {
    color: var(--color-text) !important;
}

/* --- Dark mode toggle button --- */
#dark-mode-toggle {
  position: fixed !important;
  top:      1rem !important;
  right:    1rem !important;
  background: none !important;
  border:     none !important;
  padding:    0.5rem !important;
  cursor:     pointer !important;
  z-index:    9999 !important;
  transition: transform 0.3s ease-in-out !important;
}
#dark-mode-toggle:hover {
  transform: scale(1.1) !important;
}
#dark-mode-toggle .icon svg {
  width: 24px !important;
  height: 24px !important;
  fill: var(--color-text) !important;
}
/* W trybie dark-mode zmień kolor ikonki dla kontrastu */
html.dark-mode #dark-mode-toggle .icon svg {
  fill: var(--color-bg) !important;
}

html.dark-mode #dark-mode-toggle .icon-sun svg {
  stroke: #ffffff;
}


/* Override unwanted hover background and color for ld-button */
.learndash-wrapper .ld-button:hover:not([disabled]):not(.ld-button-transparent):not(.ld--ignore-inline-css) {
    background-color: transparent !important;
    color: var(--color-text) !important;
}

/* Force transparent hover background for ld-button with higher specificity and remove images */
body .learndash-wrapper .ld-button:hover:not([disabled]):not(.ld-button-transparent):not(.ld--ignore-inline-css) {
    background-color: transparent !important;
    background-image: none !important;
    color: var(--color-text) !important;
}

/* Force transparent background for Next/Prev buttons specifically */
.learndash-wrapper .ld-content-action .ld-button:not(.ld-button-reverse):not(.ld-button-transparent):not(.ld--ignore-inline-css) {
    background-color: transparent !important;
    background-image: none !important;
}

.learndash-wrapper .ld-content-action .ld-button:hover:not([disabled]):not(.ld-button-reverse):not(.ld-button-transparent):not(.ld--ignore-inline-css) {
    background-color: transparent !important;
    background-image: none !important;
    color: var(--color-text) !important;
}

/* Dark mode override: ensure specific LearnDash elements use white text */
html.dark-mode .learndash-wrapper .ld-breadcrumbs a,
html.dark-mode .learndash-wrapper .ld-lesson-item.ld-is-current-lesson .ld-lesson-item-preview-heading,
html.dark-mode .learndash-wrapper .ld-lesson-item.ld-is-current-lesson .ld-lesson-title,
html.dark-mode .learndash-wrapper .ld-primary-color-hover:hover,
html.dark-mode .learndash-wrapper .ld-primary-color,
html.dark-mode .learndash-wrapper .ld-tabs .ld-tabs-navigation .ld-tab.ld-active,
html.dark-mode .learndash-wrapper .ld-button.ld-button-transparent,
html.dark-mode .learndash-wrapper .ld-button.ld-button-reverse,
html.dark-mode .learndash-wrapper .ld-icon-certificate,
html.dark-mode .learndash-wrapper .ld-login-modal .ld-login-modal-login .ld-modal-heading,
html.dark-mode #wpProQuiz_user_content a,
html.dark-mode .learndash-wrapper .ld-item-list .ld-item-list-item a.ld-item-name:hover,
html.dark-mode .learndash-wrapper .ld-focus-comments__heading-actions .ld-expand-button,
html.dark-mode .learndash-wrapper .ld-focus-comments__heading a,
html.dark-mode .learndash-wrapper .ld-focus-comments .comment-respond a,
html.dark-mode .learndash-wrapper .ld-focus-comment .ld-comment-reply a.comment-reply-link:hover,
html.dark-mode .learndash-wrapper .ld-expand-button.ld-button-alternate {
    color: var(--color-text) !important;
}

/* Enhance dark-mode toggle visibility and layering */
#dark-mode-toggle {
  background: var(--color-bg) !important;
  border: 1px solid var(--color-border) !important;
  border-radius: 50% !important;
  padding: 0.75rem !important;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3) !important;
  z-index: 999999 !important; /* above admin bar */
}
#dark-mode-toggle .icon svg {
  width: 28px !important;
  height: 28px !important;
}

#dark-mode-toggle:hover {
  transform: scale(1.2) !important;
  box-shadow: 0 4px 8px rgba(0,0,0,0.4) !important;
}

/* Ensure sun icon is white in dark mode */
html.dark-mode #dark-mode-toggle .icon-sun svg {
  fill: #ffffff !important;
}

/* Optionally, change moon icon color in light mode */
html:not(.dark-mode) #dark-mode-toggle .icon-moon svg {
  fill: #000000 !important;
}

/* Header and Footer styling in dark mode */
html.dark-mode .site-header,
html.dark-mode .ast-header-break-point .main-header-bar {
  background-color: var(--color-primary) !important;
}
html.dark-mode .site-header a,
html.dark-mode .ast-header-break-point .main-header-bar a {
  color: var(--color-bg) !important;
}
html.dark-mode .site-footer,
html.dark-mode .ast-footer-copyright {
  background-color: var(--color-primary) !important;
}
html.dark-mode .site-footer a,
html.dark-mode .ast-footer-copyright a {
  color: var(--color-bg) !important;
}

/* Stronger Footer overrides targeting specific Astra structure */
html.dark-mode #colophon,
html.dark-mode .site-primary-footer-wrap,
html.dark-mode .site-below-footer-wrap {
  background-color: var(--color-bg) !important;
}
html.dark-mode #colophon a,
html.dark-mode .site-primary-footer-wrap a,
html.dark-mode .site-below-footer-wrap a {
  color: var(--color-bg) !important;
}

/* Stronger Header overrides targeting Astra header */
html.dark-mode .ast-header-break-point .main-header-bar,
html.dark-mode #masthead,
html.dark-mode .site-header {
  background-color: var(--color-primary) !important;
}
html.dark-mode .ast-header-break-point .main-header-bar a,
html.dark-mode #masthead a,
html.dark-mode .site-header a {
  color: var(--color-bg) !important;
}

/* Dark mode: enforce light text for entire footer content */
html.dark-mode #colophon,
html.dark-mode #colophon * {
  color: var(--color-bg) !important;
}
/* Ensure footer widget areas and navigation links are also white */
html.dark-mode .footer-widget-area,
html.dark-mode .footer-bar-navigation,
html.dark-mode .footer-widget-area a,
html.dark-mode .ast-footer-copyright {
  color: var(--color-bg) !important;
}

/* Additional stronger rule for footer text and links in dark mode */
html.dark-mode #colophon,
html.dark-mode #colophon *,
html.dark-mode .footer-bar-navigation .menu-link,
html.dark-mode .ast-footer-copyright p {
    color: var(--color-bg) !important;
}

/* Specifically target menu items in footer */
html.dark-mode .footer-bar-navigation ul li a {
    color: var(--color-bg) !important;
}

/* Ensure paragraphs and widget titles in footer are visible */
html.dark-mode #colophon p,
html.dark-mode #colophon h1,
html.dark-mode #colophon h2,
html.dark-mode #colophon h3,
html.dark-mode #colophon h4,
html.dark-mode #colophon h5,
html.dark-mode #colophon h6 {
    color: var(--color-bg) !important;
}

/* Ultra-specific overrides for Astra header in dark mode */
html.dark-mode body.dark-mode .ast-header-break-point .main-header-bar,
html.dark-mode body.dark-mode .main-header-bar,
html.dark-mode body.dark-mode .main-header-bar .main-header-bar-wrap {
  background-color: var(--color-primary) !important;
}
html.dark-mode body.dark-mode .main-header-bar .ast-builder-menu-toggle,
html.dark-mode body.dark-mode .main-header-bar .main-header-bar-navigation a,
html.dark-mode body.dark-mode .site-title a {
  color: var(--color-bg) !important;
}

/* Ultra-specific overrides for Astra footer in dark mode */
html.dark-mode body.dark-mode .site-footer,
html.dark-mode body.dark-mode .site-footer .site-primary-footer-wrap,
html.dark-mode body.dark-mode .site-footer .site-below-footer-wrap {
  background-color: var(--color-primary) !important;
}
html.dark-mode body.dark-mode .site-footer a,
html.dark-mode body.dark-mode .site-footer p,
html.dark-mode body.dark-mode .site-footer h1,
html.dark-mode body.dark-mode .site-footer h2,
html.dark-mode body.dark-mode .site-footer h3 {
  color: var(--color-bg) !important;
}

/* Ultra-specific override for header menu background & links in dark mode */
html.dark-mode body.dark-mode .ast-desktop-header .main-header-bar-wrap,
html.dark-mode body.dark-mode .ast-primary-header-bar,
html.dark-mode body.dark-mode .main-header-bar-wrap,
html.dark-mode body.dark-mode .main-header-bar {
    background-color: var(--color-primary) !important;
}
html.dark-mode body.dark-mode .main-header-bar-navigation,
html.dark-mode body.dark-mode .main-navigation {
    background-color: transparent !important;
}
html.dark-mode body.dark-mode .main-header-menu li a.menu-link,
html.dark-mode body.dark-mode .ast-builder-menu-toggle,
html.dark-mode body.dark-mode .main-header-bar .main-header-bar-navigation a.menu-link {
    color: var(--color-bg) !important;
    background-color: transparent !important;
}
/* Hover state for header menu links */
html.dark-mode body.dark-mode .main-header-menu li a.menu-link:hover {
    color: var(--color-secondary-bg) !important;
}

/* Override Astra default menu background in dark mode */
html.dark-mode body.dark-mode .ast-builder-menu-1 .main-header-menu,
html.dark-mode body.dark-mode .ast-builder-menu-1 .main-header-menu .sub-menu {
    background-color: var(--color-primary) !important;
}
/* Ensure submenu items also inherit dark background and light text */
html.dark-mode body.dark-mode .ast-builder-menu-1 .main-header-menu .sub-menu li a {
    color: var(--color-bg) !important;
}


