/* Kártya alapja flexbox lesz */
.learndash-course-grid .items-wrapper .grid-2 .post {
    line-height: 1.428571429;
    background-color: #ffffff;
    border: 1px solid #dddddd;
    border-radius: 4px;
    -webkit-transition: all 0.2s ease-in-out;
    transition: all 0.2s ease-in-out;
    display: flex !important; /* <--- EZ A KULCS */
    flex-direction: column;   /* <--- EZ A KULCS */
    height: 100%;             /* <--- EZ A KULCS */
    position: relative;
    padding: 0;
    margin: 0;
    box-shadow: 2px 2px 2px 1px rgb(0 0 0 / 5%);
}

/* A tartalom kitölti a maradék űrt */
.learndash-course-grid .items-wrapper .grid-2 .content {
    padding: 30px 22px;
    color: #333333;
    display: flex;            /* <--- EZ A KULCS */
    flex-direction: column;   /* <--- EZ A KULCS */
    flex-grow: 1;             /* <--- EZ A KULCS */
}

.learndash-course-grid .items-wrapper .grid-2 .content > *:not(:last-child) {
    margin-bottom: 20px;
}

/* Az új akciógomb tartó, ami mindig stabilan a kártya aljára tapad és tartja a magasságot */
.learndash-course-grid .items-wrapper .grid-2 .content .mh-card-actions {
    margin-top: auto;         /* Lenyomja a kártya legaljára */
    min-height: 85px;         /* Fenntartja a helyet (Gomb + Pill + Térköz), akkor is ha üres! */
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    width: 100%;
}

.learndash-course-grid .items-wrapper .grid-2 .content .mh-card-actions .button {
    margin-bottom: 0;
    padding: 0;
    background: none;
    border: none;
    border-radius: 5px;
    width: 100%;
}

.learndash-course-grid .items-wrapper .grid-2 .content .mh-card-actions .button a {
    color: #ffffff;
    font-weight: bold;
    text-decoration: none;
    -webkit-transition: all 0.3s ease;
    transition: all 0.3s ease;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    background-color: #143f5e;
    border-color: #143f5e;
    border-radius: 5px;
    font-size: 1rem;
    padding: 12px 0;
}

.learndash-course-grid .items-wrapper .grid-2 .content .mh-card-actions .button a:hover {
    background: #29648f;
    border-color: #29648f;
}

/* Ajánlói link másolása – pill gomb a kék gomb alatt */
.learndash-course-grid .items-wrapper .grid-2 .content .mh-aff-pill {
	display: flex;
	justify-content: center;
	align-items: center;
	width: 100%;
	min-height: 28px; /* 32–36px */
	margin-top: 6px;  /* 6–8px térköz a Folytatás gomb alatt */
    margin-bottom: 0;
	padding: 5px 10px;
	border-radius: 999px;
	border: 1px solid rgba(20, 63, 94, 0.22); /* #143f5e */
	background: #fff;
	color: #143f5e;
	cursor: pointer;
	font-size: 0.55rem;
	font-weight: 700;
	line-height: 1;
	transition: background .15s ease, border-color .15s ease, transform .12s ease, box-shadow .15s ease;
	-webkit-tap-highlight-color: transparent;
	user-select: none;
    gap: 8px; /* ikon és szöveg között */
}

.learndash-course-grid .items-wrapper .grid-2 .content .mh-aff-pill:hover {
	background: rgba(253, 253, 150, 0.35); /* #FDFD96 finoman */
	border-color: rgba(20, 63, 94, 0.38);
	transform: translateY(-1px);
	box-shadow: 0 8px 16px rgba(0,0,0,0.08);
}

.learndash-course-grid .items-wrapper .grid-2 .content .mh-aff-pill:active {
	transform: translateY(0);
	box-shadow: none;
}

/* Felirat span, ha külön elemben van */
.learndash-course-grid .items-wrapper .grid-2 .content .mh-aff-pill__label {
	display: inline-block;
	white-space: pre-line; /* ettől fog a <br> és a JS-es sortörés is szépen látszani */
	text-align: center;
	line-height: 1.15;
}

.learndash-course-grid .items-wrapper .grid-2 .content .mh-aff-pill__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 22px;
	min-width: 22px;
	height: 22px;
	border-radius: 999px;
	border: 1px solid rgba(20, 63, 94, 0.22);
	color: #143f5e;
	font-size: 13px;
	line-height: 1;
	opacity: 0.9;
}

/* Másolás közbeni állapot (JS: .is-busy) */
.learndash-course-grid .items-wrapper .grid-2 .content .mh-aff-pill.is-busy {
	opacity: 0.75;
	cursor: progress;
}

/* Sikerállapot (JS: .is-copied) */
.learndash-course-grid .items-wrapper .grid-2 .content .mh-aff-pill.is-copied {
	background: rgba(95, 195, 174, 0.18); /* menta */
	border-color: rgba(95, 195, 174, 0.45);
	color: #143f5e;
}

/* Hibaállapot (JS: .is-error) */
.learndash-course-grid .items-wrapper .grid-2 .content .mh-aff-pill.is-error {
	background: rgba(230, 120, 23, 0.10); /* narancsos jelzés */
	border-color: rgba(230, 120, 23, 0.35);
}

/* --- Kép és egyéb formázások --- */

.learndash-course-grid .items-wrapper .grid-2 .ribbon {
    text-shadow: 0 1px rgb( 0 0 0 / 30% );
    position: absolute;
    z-index: 2;
    top: 20px;
    right: 15px;
    left: auto;
    padding: 10px 12px;
    border-radius: 6px;
    color: #fff;
    background: #0f69aa;
    font-weight: bold;
    font-size: 1rem;
}

.learndash-course-grid .items-wrapper .grid-2 .thumbnail {
    margin: 0;
    padding: 0;
    position: relative;
}

.learndash-course-grid .items-wrapper .grid-2 .thumbnail img {
    margin: 0 auto;
    padding: 0;
    width: 100%;
    height: auto;
}

.learndash-course-grid .items-wrapper .grid-2 .thumbnail .arrow {
    position: absolute;
    right: 10px;
    bottom: -18px;
    left: initial;
    top: initial;
    overflow: visible;
    z-index: 1000;
    height: auto;
    width: auto;
    margin: 0;
    padding: 0;
    border-radius: 100px;
}

.learndash-course-grid .items-wrapper .grid-2 .thumbnail .arrow a {
    border-radius: 100px;
    display: block;
}

.learndash-course-grid .items-wrapper .grid-2 .thumbnail .arrow * {
    text-decoration: none;
}

.learndash-course-grid .items-wrapper .grid-2 .thumbnail .arrow .dashicons {
    background: #fd9752;
    color: #fff;
    font-size: 25px;
    width: auto;
    height: auto;
    padding: 5px;
    border-radius: 100px;
}

.learndash-course-grid .items-wrapper .grid-2 .content .author {
    display: flex;
    gap: 15px;
    font-size: 0.875rem;
    color: #949ca1;
}

.learndash-course-grid .items-wrapper .grid-2 .content .author .avatar {
    width: 43px;
    height: 43px;
    border-radius: 30px;
    display: block;
}

.learndash-course-grid .items-wrapper .grid-2 .content .author .wrapper {
    display: grid;
    width: 100%;
}

.learndash-course-grid .items-wrapper .grid-2 .content .author .name {
    font-weight: bold;
    font-size: 1rem;
}

.learndash-course-grid .items-wrapper .grid-2 .content .author .wrapper .lessons {
    float: right;
}

.learndash-course-grid .items-wrapper .grid-2 .content .entry-title {
    font-size: 1.2rem;
    font-weight: bold;
    line-height: 1.2;
    color: #333;
}

.learndash-course-grid .items-wrapper .grid-2 .content .entry-title a {
    text-decoration: none;
    color: #333;
    font-size: 1.2rem;
    line-height: 1.2;
    font-weight: bold;
}

.learndash-course-grid .items-wrapper .grid-2 .content .entry-content {
    margin-bottom: 20px;
    color: #949ca1;
    font-size: 0.875rem;
}

.learndash-course-grid .items-wrapper .grid-2 .content .entry-content > * {
    margin: 0;
}