.mcpl-wrap {
    width: 100%;
}

.mcpl-grid {
    display: grid;
    grid-template-columns: repeat(var(--mcpl-columns, 4), minmax(0, 1fr));
    gap: 14px;
}

.mcpl-item {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    border-radius: 10px;
    background: #111;
    text-decoration: none !important;
}

.mcpl-item img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition: transform .22s ease;
}

.mcpl-item:hover img,
.mcpl-item:focus img {
    transform: scale(1.035);
}

.mcpl-caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 26px 10px 8px;
    color: #fff;
    font-size: 13px;
    line-height: 1.25;
    background: linear-gradient(to top, rgba(0,0,0,.76), rgba(0,0,0,0));
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mcpl-button-wrap {
    margin-top: 22px;
    text-align: center;
}

.mcpl-button {
    display: inline-block;
    padding: 11px 20px;
    border-radius: 7px;
    background: #222;
    color: #fff !important;
    text-decoration: none !important;
    font-weight: 600;
}

.mcpl-button:hover,
.mcpl-button:focus {
    opacity: .88;
}

.mcpl-event-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    margin: 28px 0;
}

.mcpl-event-card {
    position: relative;
    display: block;
    min-height: 330px;
    overflow: hidden;
    border-radius: 12px;
    background: #171717;
    color: #fff !important;
    text-decoration: none !important;
    box-shadow: 0 6px 22px rgba(0,0,0,.14);
}

.mcpl-event-image,
.mcpl-event-placeholder {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.mcpl-event-image {
    object-fit: cover;
    transition: transform .3s ease;
}

.mcpl-event-placeholder {
    background: #2b2b2b;
}

.mcpl-event-card:hover .mcpl-event-image,
.mcpl-event-card:focus .mcpl-event-image {
    transform: scale(1.04);
}

.mcpl-event-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 28px 24px;
    background: linear-gradient(to top, rgba(0,0,0,.88) 0%, rgba(0,0,0,.42) 58%, rgba(0,0,0,.08) 100%);
}

.mcpl-event-overlay h3 {
    margin: 0 0 10px;
    color: #fff !important;
    font-size: 25px;
    line-height: 1.15;
}

.mcpl-event-overlay p {
    margin: 0 0 14px;
    color: rgba(255,255,255,.9);
    line-height: 1.45;
}

.mcpl-event-button {
    font-weight: 700;
    color: #fff;
}

.mcpl-error,
.mcpl-empty {
    padding: 12px 14px;
    border: 1px solid rgba(0,0,0,.12);
    border-radius: 6px;
}

@media (max-width: 950px) {
    .mcpl-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .mcpl-event-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 650px) {
    .mcpl-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .mcpl-item {
        border-radius: 6px;
    }

    .mcpl-event-grid {
        grid-template-columns: 1fr;
    }

    .mcpl-event-card {
        min-height: 300px;
    }
}


/* 1.1.5 – robust event previews */
.mcpl-event-card {
    isolation: isolate;
}

.mcpl-event-image {
    background: #222;
}

.mcpl-event-card::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.08);
    border-radius: inherit;
}

.mcpl-event-overlay {
    z-index: 2;
}


/* =========================================================
   1.1.6 – COMPLETE GALLERY PAGE SHORTCODE
========================================================= */

.mcpg-page{
    --mcpg-text:#252525;
    --mcpg-muted:#666;
    --mcpg-highland:#eee6da;
    --mcpg-latest:#fff;
    --mcpg-events:#e7eef2;
    --mcpg-training:#e9efe5;
    max-width:1240px;
    margin:0 auto;
    padding:0 14px 50px;
}
.mcpg-page *{box-sizing:border-box}

.mcpg-cover{
    min-height:500px;
    display:flex;
    align-items:center;
    justify-content:center;
    margin-bottom:68px;
    padding:70px 35px;
    border-radius:22px;
    overflow:hidden;
    text-align:center;
    color:#fff;
    background:
        radial-gradient(circle at 75% 20%,rgba(255,255,255,.13),transparent 35%),
        linear-gradient(135deg,#101214 0%,#292f33 55%,#111315 100%);
    box-shadow:0 18px 46px rgba(0,0,0,.20);
}
.mcpg-cover-inner{max-width:850px}
.mcpg-kicker,
.mcpg-eyebrow{
    display:block;
    margin-bottom:9px;
    font-size:12px;
    font-weight:800;
    letter-spacing:1.8px;
    text-transform:uppercase;
}
.mcpg-kicker{color:#d0d0d0}
.mcpg-cover h1{
    margin:0 0 18px!important;
    color:#fff!important;
    font-size:56px;
    line-height:1.05;
}
.mcpg-cover p{
    max-width:760px;
    margin:0 auto 32px;
    color:#ddd;
    font-size:19px;
    line-height:1.7;
}
.mcpg-actions{
    display:flex;
    justify-content:center;
    flex-wrap:wrap;
    gap:12px;
}
.mcpg-btn{
    display:inline-block;
    padding:14px 25px;
    border-radius:9px;
    font-size:16px;
    font-weight:700;
    text-decoration:none!important;
    transition:transform .2s ease;
}
.mcpg-btn:hover{transform:translateY(-2px)}
.mcpg-btn-light{background:#fff;color:#171717!important}
.mcpg-btn-ghost{
    border:1px solid rgba(255,255,255,.45);
    background:rgba(255,255,255,.08);
    color:#fff!important;
}

.mcpg-section{
    overflow:hidden;
    margin-bottom:64px;
    border-radius:18px;
}
.mcpg-inner{padding:56px 38px}
.mcpg-head{
    max-width:800px;
    margin:0 auto 36px;
    text-align:center;
}
.mcpg-head h2,
.mcpg-feature-head h2{
    margin:0 0 11px!important;
    color:var(--mcpg-text);
    font-size:36px;
    line-height:1.2;
}
.mcpg-head p,
.mcpg-feature-head p{
    margin:0;
    color:var(--mcpg-muted);
    font-size:16px;
    line-height:1.65;
}
.mcpg-eyebrow{color:#777}

.mcpg-highland{background:var(--mcpg-highland)}
.mcpg-highland .mcpg-eyebrow{color:#79664b}
.mcpg-latest{
    border:1px solid #ededed;
    background:var(--mcpg-latest);
}
.mcpg-events{
    background:var(--mcpg-events);
    height:100%;
}
.mcpg-events .mcpg-eyebrow{color:#557081}
.mcpg-training{
    background:var(--mcpg-training);
    height:100%;
}
.mcpg-training .mcpg-eyebrow{color:#59704f}

.mcpg-feature-head{
    display:flex;
    align-items:flex-end;
    justify-content:space-between;
    gap:24px;
    margin-bottom:28px;
}
.mcpg-feature-head>div{max-width:720px}
.mcpg-badge{
    display:inline-block;
    padding:8px 13px;
    border-radius:999px;
    background:#171717;
    color:#fff;
    font-size:12px;
    font-weight:700;
    white-space:nowrap;
}

.mcpg-two-col{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:22px;
    align-items:stretch;
    margin-bottom:64px;
}
.mcpg-two-col .mcpg-section{
    margin-bottom:0;
}

.mcpg-functions{
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:14px;
    margin:0 0 64px;
}
.mcpg-function{
    padding:24px 14px;
    border-radius:14px;
    background:#f3f3f3;
    text-align:center;
}
.mcpg-function>span{
    display:block;
    margin-bottom:8px;
    font-size:28px;
}
.mcpg-function strong{
    display:block;
    margin-bottom:3px;
    font-size:15px;
}
.mcpg-function small{
    display:block;
    color:#777;
    font-size:13px;
}

.mcpg-archive{
    padding:68px 35px;
    border-radius:20px;
    text-align:center;
    color:#fff;
    background:
        radial-gradient(circle at 20% 20%,rgba(255,255,255,.08),transparent 35%),
        #131516;
}
.mcpg-archive .mcpg-eyebrow{color:#999}
.mcpg-archive h2{
    margin:0 0 16px!important;
    color:#fff!important;
    font-size:38px;
}
.mcpg-archive p{
    max-width:760px;
    margin:0 auto 30px;
    color:#c8c8c8;
    font-size:17px;
    line-height:1.7;
}

@media(max-width:900px){
    .mcpg-cover{min-height:430px}
    .mcpg-cover h1{font-size:45px}
    .mcpg-two-col{grid-template-columns:1fr}
    .mcpg-functions{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:650px){
    .mcpg-page{padding-left:7px;padding-right:7px}
    .mcpg-cover{
        min-height:380px;
        padding:54px 20px;
        margin-bottom:48px;
        border-radius:15px;
    }
    .mcpg-cover h1{font-size:36px}
    .mcpg-cover p{font-size:16px}
    .mcpg-actions{display:block}
    .mcpg-actions .mcpg-btn{display:block;margin:9px 0}
    .mcpg-section{margin-bottom:46px;border-radius:14px}
    .mcpg-inner{padding:40px 18px}
    .mcpg-head h2,
    .mcpg-feature-head h2,
    .mcpg-archive h2{font-size:29px}
    .mcpg-feature-head{display:block}
    .mcpg-badge{margin-top:17px}
    .mcpg-two-col{gap:14px;margin-bottom:46px}
    .mcpg-functions{grid-template-columns:1fr 1fr;gap:8px;margin-bottom:46px}
    .mcpg-function{padding:20px 8px}
    .mcpg-archive{padding:48px 20px;border-radius:15px}
}


/* =========================================================
   1.1.7 – CLASSIC VISUAL EDITOR SECTIONS
========================================================= */

.mc-ve-section{
    margin:0 0 58px;
    padding:52px 36px;
    border-radius:18px;
    box-sizing:border-box;
}
.mc-ve-section > :first-child{margin-top:0!important}
.mc-ve-section > :last-child{margin-bottom:0!important}

.mc-ve-section h1,
.mc-ve-section h2,
.mc-ve-section h3{
    line-height:1.2;
}

.mc-ve-intro{
    padding:66px 38px;
    text-align:center;
    color:#fff;
    background:
        radial-gradient(circle at 75% 20%,rgba(255,255,255,.12),transparent 34%),
        linear-gradient(135deg,#101214,#292f33 58%,#111315);
    box-shadow:0 16px 42px rgba(0,0,0,.18);
}
.mc-ve-intro h1,
.mc-ve-intro h2,
.mc-ve-intro h3{color:#fff!important}
.mc-ve-intro p{
    max-width:800px;
    margin-left:auto;
    margin-right:auto;
    color:#ddd;
}

.mc-ve-highland{background:#eee6da}
.mc-ve-latest{
    background:#fff;
    border:1px solid #e9e9e9;
}
.mc-ve-events{background:#e7eef2}
.mc-ve-training{background:#e9efe5}

.mc-ve-archive{
    padding:60px 36px;
    text-align:center;
    color:#fff;
    background:
        radial-gradient(circle at 20% 20%,rgba(255,255,255,.08),transparent 35%),
        #131516;
}
.mc-ve-archive h1,
.mc-ve-archive h2,
.mc-ve-archive h3{color:#fff!important}
.mc-ve-archive p{
    max-width:800px;
    margin-left:auto;
    margin-right:auto;
    color:#ccc;
}

.mc-ve-features{
    padding:28px 30px;
    text-align:center;
    background:#f3f3f3;
}

.mc-ve-section .mcpl-wrap,
.mc-ve-section .mcpl-event-card{
    margin-top:24px;
}

@media(max-width:650px){
    .mc-ve-section{
        margin-bottom:42px;
        padding:38px 18px;
        border-radius:14px;
    }
    .mc-ve-intro{padding:48px 20px}
    .mc-ve-archive{padding:45px 20px}
}


/* =========================================================
   1.2.1 – PIWIGO INSIDE WORDPRESS
========================================================= */

.mcpl-embed-shell{
    width:100%;
    margin:0 auto 36px;
}

.mcpl-embed-toolbar{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    margin:0 0 14px;
    padding:12px 15px;
    border:1px solid #e3e3e3;
    border-radius:10px;
    background:#f6f6f6;
}

.mcpl-embed-back,
.mcpl-embed-external{
    font-size:14px;
    font-weight:700;
    text-decoration:none!important;
}

.mcpl-embed-title{
    margin:0 0 16px!important;
}

.mcpl-embed-frame{
    display:block;
    width:100%;
    border:0;
    border-radius:12px;
    background:#171717;
    box-shadow:0 8px 28px rgba(0,0,0,.12);
}

@media(max-width:650px){
    .mcpl-embed-toolbar{
        display:block;
    }

    .mcpl-embed-back,
    .mcpl-embed-external{
        display:block;
        padding:4px 0;
    }

    .mcpl-embed-frame{
        min-height:650px!important;
        height:78vh!important;
        border-radius:8px;
    }
}
