/* === MBI Galéria – Alap CSS === */
.mbi-gallery-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin: 32px 0;
    justify-content: center;
}

.mbi-gallery-item {
    flex: 1 0 calc(33.333% - 16px);
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    position: relative;
}

.mbi-gallery-item img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 6px;
    transition: transform 0.2s ease;
    cursor: zoom-in;
}

.mbi-gallery-item img:hover {
    transform: scale(1.02);
}

.mbi-gallery-mobile-item,
.mbi-gallery-mobile-ad {
    scroll-margin-top: 120px; /* sticky header + extra */
}

.mbi-gallery-ad {
    flex: 1 0 100%;
    box-sizing: border-box;
    background: #f9f9f9;
    padding: 12px;
    border-radius: 6px;
    text-align: center;
    font-size: 14px;
    font-style: italic;
}

/* === Mobil nézet: képek egymás alatt === */
@media screen and (max-width: 768px) {
    .mbi-gallery-wrapper {
        flex-direction: column;
        gap: 12px;
    }

    .mbi-gallery-item,
    .mbi-gallery-ad {
        flex: 1 0 100%;
    }
}

/* === Galéria ikon overlay a képeken === */
.mbi-gallery-trigger {
    position: absolute;
    top: 8px;
    right: 8px;
    background-color: rgba(0, 0, 0, 0.7);
    color: #fff;
    font-size: 13px;
    padding: 4px 8px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    z-index: 100;
}

.mbi-gallery-trigger img.icon {
    width: 16px;
    height: 16px;
    display: inline-block;
}

.mbi-gallery-trigger:hover {
    background-color: rgba(0, 0, 0, 0.85);
}

.mbi-img-container {
    display: inline-block;
    position: relative;
    text-align: center;
    max-width: 100%;
    margin: 0 auto;
}

.mbi-gallery-icon-overlay {
    position: absolute;
    top: 6px;
    right: 6px;
    background: rgba(0, 0, 0, 0.65);
    color: #fff;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
    z-index: 2;
}

.mbi-gallery-wrapper .mbi-gallery-icon-overlay img {
    width: 14px !important;
    height: 14px !important;
    object-fit: contain;
}

/* === Galéria lightbox === */
/* 🔒 Lightbox teljes képernyő */
.mbi-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10,10,10,0.92);
    z-index: 99999;
    display: none;
    flex-direction: column;
    overflow: hidden;
}

.mbi-lightbox.active {
    display: flex;
}

/* 🔝 Header javítása WordPress admin barhoz */
.mbi-lightbox-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #141414;
    color: white;
    padding: 8px 16px;
    height: 52px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100001;
}

/* ⬅️ Bal oldal: logó + cím */
.mbi-lightbox-header .logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.mbi-lightbox-header .logo img {
    height: 20px;
}

.mbi-lightbox-header .title {
    font-size: 14px;
    color: #d0d0d0;
    font-weight: 500;
    max-width: 60vw;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ➡️ Jobb oldal: dátum + bezárás */
.mbi-lightbox-header .info {
    display: flex;
    align-items: center;
    gap: 12px;
    white-space: nowrap;
}

.mbi-lightbox-close {
    top: auto !important;
    position: relative;
    font-size: 28px;
    margin-left: 4px;
}

/* Ha van adminbar, offset 32px vagy több mobilon */
body.admin-bar .mbi-lightbox {
    --adminbar-offset: 32px;
}
@media screen and (max-width: 782px) {
    body.admin-bar .mbi-lightbox {
        --adminbar-offset: 46px;
    }
}

/* Kép tartalom */
.mbi-lightbox-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding-top: 60px;
    padding-bottom: 130px; /* thumbnails sáv helye */
    text-align: center;
}

.mbi-lightbox-image {
    max-width: 90%;
    max-height: 70vh;
    transition: 0.3s ease-in-out;
    border-radius: 6px;
    background: rgba(0,0,0,0.5);
}

/* Caption eltüntetése, mert már a thumbs headerben van */
.mbi-lightbox-caption {
    display: none;
}

/* 🔻 Thumbnails footer javítás */
/* 🔻 Thumbnails footer javítás */
.mbi-lightbox-thumbs-wrapper {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100002;
    transition: transform 0.3s ease;
}

.mbi-lightbox-thumbs-collapsed {
    transform: translateY(calc(100% - 40px));
}

.mbi-lightbox-secondary-header {
    background-color: rgba(20, 20, 20, 0.4);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    color: #ffffff;
    padding: 6px 12px;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    line-height: 1.4;
    position: relative;
    z-index: 2;
    display: none; /* alapból rejtve, JS kapcsolja be */
    transition: opacity 0.3s ease;
}

/* Amikor láthatóvá tesszük */
.mbi-lightbox-secondary-header.active {
    display: block;
}

.mbi-lightbox-thumbs-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #141414;
    color: white;
    padding: 6px 16px;
    font-size: 14px;
    min-height: 40px;
    box-sizing: border-box;
}

/* ➕ Bal oldal: kép címe */
.mbi-lightbox-thumbs-header .thumbs-left .mbi-lightbox-thumb-caption {
    color: #d0d0d0;
    font-style: italic;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 40vw;
}

/* ➕ Jobb oldal: gombok + dátum + toggle */
.mbi-lightbox-thumbs-header .thumbs-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: nowrap;
}

.thumb-share-fb {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 28px;
    height: 28px;
    background: #ffffff10;
    color: white;
    font-weight: bold;
    font-size: 16px;
    text-decoration: none;
    border-radius: 4px;
    transition: background 0.2s;
}
.thumb-share-fb:hover {
    background: #ffffff30;
}

.thumb-article-link {
    background: #3a3a3a;
    color: white;
    padding: 4px 10px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 13px;
}
.thumb-article-link:hover {
    background: #505050;
}

.mbi-lightbox-thumbs-header .mbi-lightbox-date {
    color: #aaa;
    font-size: 13px;
    white-space: nowrap;
}

.mbi-lightbox-thumbs-toggle {
    width: 18px;
    height: 18px;
    cursor: pointer;
    opacity: 0.8;
    transition: transform 0.3s ease;
}
.mbi-lightbox-thumbs-toggle.rotate-up {
    transform: rotate(180deg);
}

.mbi-lightbox-thumbs-toggle:hover {
    opacity: 1;
}

/* 📸 Thumbnails képek */
.mbi-lightbox-thumbs {
    display: flex;
    overflow-x: hidden; /* ⛔ scrollbar eltüntetve */
    padding: 10px 40px; /* ⬅➡ hely a nyilaknak */
    gap: 6px;
    background: #141414;
    position: relative;
    height: 115px; /* 105px thumb + padding + align center */
    align-items: center;
    scroll-behavior: smooth;
}

/* Scrollbar elrejtése WebKit alapú böngészőkön */
.mbi-lightbox-thumbs::-webkit-scrollbar {
    display: none;
}

.mbi-lightbox-thumbs img {
    height: 105px; /* 🔺 új magasság */
    cursor: pointer;
    opacity: 0.7;
    border-radius: 4px;
    transition: 0.2s;
}

.mbi-lightbox-thumbs img.active {
    outline: 4px solid #ff4128;
    opacity: 1;
}

.mbi-lightbox-thumbs img:hover {
    opacity: 1;
    outline: 2px solid #fff;
}

/* 🔁 Thumbnails scroll konténer (nyilakhoz) */
.mbi-lightbox-thumbs-scroll {
    position: relative;
    height: 115px; /* egyezik a thumbs sávval */
}

/* ⬅➡ Thumbnails navigációs nyilak */
.mbi-thumbs-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 28px;
    color: white;
    background: rgba(0, 0, 0, 0.5);
    padding: 4px 10px;
    border-radius: 4px;
    cursor: pointer;
    z-index: 2;
    user-select: none;

    display: flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    width: 32px;
}

.mbi-thumbs-arrow.left {
    left: 6px;
}

.mbi-thumbs-arrow.right {
    right: 6px;
}

/* 🔘 Navigáció és bezárás */
.mbi-lightbox-close,
.mbi-lightbox-nav {
    position: fixed;
    color: white;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    z-index: 100003;
    user-select: none;
}

.mbi-lightbox-close {
    top: calc(var(--adminbar-offset, 0px) + 8px);
    right: 16px;
}

.mbi-lightbox-prev {
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
}
.mbi-lightbox-next {
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
}

.mbi-lightbox-ad-container {
    max-width: 100%;
    padding: 20px;
    text-align: center;
}


/* == Mobil Galéria == */
.mbi-gallery-mobile {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 9999;
    overflow-y: auto;
    color: #fff;
    font-family: sans-serif;
    display: none;
    flex-direction: column;
}

.mbi-gallery-mobile.active {
    display: flex;
}

.mbi-gallery-mobile-header {
    position: sticky;
    top: 0;
    z-index: 10001;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(6px);
    padding: 10px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mbi-gallery-mobile-header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mbi-gallery-mobile-closebtn {
    background: none;
    border: none;
    color: #fff;
    font-size: 24px;
    padding: 4px 8px;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s ease;
}
.mbi-gallery-mobile-closebtn:hover {
    color: #ff4128;
}

.mbi-gallery-mobile-header .mbi-gallery-mobile-logo {
    height: 24px;
    margin-bottom: 8px;
}

.mbi-gallery-mobile-header .mbi-gallery-mobile-logo img {
    height: 100%;
    width: auto;
}

.mbi-gallery-mobile-header .mbi-gallery-mobile-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    line-height: 1.3;
}

.mbi-gallery-mobile-header .mbi-gallery-mobile-meta {
    font-size: 13px;
    color: #aaa;
    margin-top: 4px;
}

/* Képek és hirdetések listája */
.mbi-gallery-mobile-wrapper {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 12px;
    padding: 10px;
    box-sizing: border-box;
}

.mbi-gallery-mobile-item {
    width: 100%;
}

.mbi-gallery-mobile-item img {
    width: 100%;
    border-radius: 6px;
    display: block;
    object-fit: cover;
    max-height: 60vh;
}

.mbi-gallery-mobile-caption {
    margin-top: 6px;
    font-size: 14px;
    color: #ddd;
    text-align: center;
    padding: 4px 0;
    position: relative;
}

.mbi-gallery-mobile-caption::after {
    content: '';
    display: block;
    width: 40%;
    height: 1px;
    background-color: #666;
    margin: 10px auto 10px;
}


/* 📢 Hirdetés blokk */
.mbi-gallery-mobile-ad {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    padding: 10px;
    min-height: 120px;
    text-align: center;
    color: #ccc;
    font-size: 14px;
}


.mbi-aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.mbi-alignleft {
    float: left;
    margin-right: 1em;
}

.mbi-alignright {
    float: right;
    margin-left: 1em;
}

.entry .mbi-img-container img {
    display: block;
    max-width: 100%;
    width: 100%;
    height: auto;
    margin: 0 auto;
}

.entry .mbi-img-container {
    max-width: 700px;
    margin: 1.5em auto;
}

/* Keretezett, képaláírásos képek stylingja */
/* Kép környezet: max 700px, középre igazítás */
.entry .wp-caption {
    max-width: 700px;
    margin: 2em auto 1.2em auto; /* Alsó margót csökkentettük */
    text-align: center;
    background: none !important;
    border: none;
    padding: 0;
    box-shadow: none;
}

/* Kép: blokkszintű, középre */
.entry .wp-caption img {
    display: block;
    width: 100%;
    height: auto;
    margin: 0 auto;
}

/* Képaláírás: kisebb térköz, letisztultabb */
.entry .wp-caption .wp-caption-text {
    font-size: 13px;
    font-style: italic;
    color: #777;
    margin-top: 6px;          /* ✂️ Ezt lejjebb veheted 4px-re ha még közelebb szeretnéd */
    margin-bottom: 2px;       /* Kevesebb hely alul is */
    padding: 0;
    position: relative;
    display: inline-block;
}

/* Aláhúzás stílus */
.entry .wp-caption .wp-caption-text::after {
    content: "";
    display: block;
    width: 60px;
    height: 2px;
    background-color: #ff4128;
    margin: 4px auto 0 auto;  /* Szorosabb távolság a szövegtől */
    border-radius: 2px;
}

/* Eltávolítja a hover-zoom effektet a galéria képekről */
.entry .mbi-gallery-wrapper img:hover {
    transform: none !important;
}

.mbi-gallery-wrapper:hover,
.mbi-gallery-wrapper .mbi-img-container:hover,
.mbi-gallery-wrapper img:hover {
    transform: none !important;
    filter: none !important;
    opacity: 1 !important;
}

.aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.mbitb-gallery-wrapper {
    display: inline-block;
    position: relative;
    vertical-align: top;
}

.mbitb-gallery-img {
    display: inline;
    margin: 0;
    vertical-align: top;
}

.mbitb-gallery-wrapper.aligncenter {
    margin: 0 auto;
}


.mbitb-gallery-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
    z-index: 10;
}

.mbitb-gallery-badge img {
    width: 16px;
    height: 16px;
    object-fit: contain;
}



/* Galéria ajánló */

.mbi-lightbox-recommendations {
       text-align: center;
       padding: 40px 20px;
   }

.mbi-lightbox-rec-title {
    font-size: 20px;
    margin-bottom: 20px;
    color: #fff;
}

.mbi-lightbox-rec-item {
    margin-bottom: 20px;
}

.mbi-lightbox-rec-link {
    display: block;
    text-decoration: none;
    color: red;
}

.mbi-lightbox-rec-link img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    margin-bottom: 8px;
}

.mbi-lightbox-rec-caption {
    font-weight: bold;
    font-size: 16px;
}

.mbi-lightbox-end {
    text-align: center;
    padding: 40px 20px;
}

.mbi-lightbox-end-message {
    font-size: 20px;
    margin-bottom: 24px;
    font-weight: bold;
    color: #fff;
}

.mbi-lightbox-recomm-wrapper {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.mbi-lightbox-recomm {
    display: block;
    width: 200px;
    text-decoration: none;
}

.mbi-lightbox-recomm img {
    width: 100%;
    border-radius: 8px;
    margin-bottom: 8px;
}

.mbi-lightbox-recomm-title {
    font-size: 16px;
    font-weight: 500;
    color: #fff;
    transition: color 0.2s ease;
}

.mbi-lightbox-recomm:hover .mbi-lightbox-recomm-title {
    color: #ffa528;
}

.mbi-lightbox-thumbs-collapsed .mbi-lightbox-end {
    display: none !important;
}


.mbi-thumb-recommendation {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: auto;
    height: 105px;
    width: 105px;
    background: #3a3a3a;
    border-radius: 4px;
    padding: 4px 6px;
    font-size: 11px;
    font-weight: bold;
    color: #f4f4f4;
    cursor: pointer;
    text-align: center;
    min-width: 60px;
    box-sizing: border-box;
}

.mbi-thumb-recommendation.active {
    background: #838383;
}

.mbi-thumb-recommendation img {
    width: 32px;
    height: 32px;
    margin-bottom: 6px;
    object-fit: contain;
}

.mbi-gallery-mobile-recomm {
    margin-top: 32px;
    padding: 20px 0;
    text-align: center;
}

.mbi-gallery-mobile-recomm-title {
    font-size: 21px;
    font-weight: bold;
    color: #fff;
    margin-bottom: 16px;
}

.mbi-gallery-mobile-recomm-wrapper {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.mbi-gallery-mobile-recomm-item {
    display: block;
    text-decoration: none;
    color: #ffa528;
    background: rgba(255, 255, 255, 0.05);
    padding: 10px;
    border-radius: 6px;
    transition: background 0.2s ease;
}

.mbi-gallery-mobile-recomm-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.mbi-gallery-mobile-recomm-item img {
    width: 100%;
    border-radius: 4px;
    margin-bottom: 8px;
    max-height: 220px;
    object-fit: cover;
}

.mbi-gallery-mobile-recomm-caption {
    font-size: 16px;
    font-weight: 700;
    color: #ffa528;
    text-align: left;
}








