.mkm-obra-header{margin:20px;}
.mkm-obra-header h1{font-size: 30px;}
.mkm-obra-galeria-slider-section {
    width: 100%;
    margin: auto;
}

.mkm-obra-galeria-slider-section h2 {
    margin-bottom: 25px;
    text-align: center;
}

.mkm-obras-slider {
    position: relative;
    width: 100%;
    margin: auto;
    overflow: hidden;
    background: #f5f5f5;
}

.mkm-obras-slider-track {
    display: flex;
    width: 100%;
    transition: transform 0.35s ease;
}

.mkm-obras-slide {
    flex: 0 0 100%;
    width: 100%;
    margin: 0;
    aspect-ratio: 16 / 9;
    background: #f5f5f5;
}

.mkm-obras-slide-img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mkm-obras-slider-arrow {
    position: absolute;
    top: 50%;
    z-index: 5;
    width: 36px;
    height: 46px;
    border: 0;
    border-radius: 0;
    background: rgba(0, 0, 0, 0.5);
    color: #fff !important;
    font-size: 36px;
    line-height: 0px;
    text-align: center;
    cursor: pointer;
    transform: translateY(-50%);
    transition: background 0.2s ease, opacity 0.2s ease;
}

.mkm-obras-slider-arrow button:hover {
    background: rgba(0, 0, 0, 0.8);
}

.mkm-obras-slider-arrow:disabled {
    opacity: 0.25;
    cursor: default;
}

.mkm-obras-slider-prev {
    left: 18px;
}

.mkm-obras-slider-next {
    right: 18px;
}

.mkm-obras-slider-counter {
    position: absolute;
    right: 18px;
    bottom: 18px;
    z-index: 5;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 14px;
    line-height: 1;
}

/* Tablet */
@media (max-width: 1024px) {
    .mkm-obras-slider {
        max-width: 90%;
    }

    .mkm-obras-slide {
        aspect-ratio: 4 / 3;
    }
}

/* Móvil */
@media (max-width: 767px) {
    .mkm-obra-galeria-slider-section {
        margin: 35px auto;
    }

    .mkm-obras-slider {
        max-width: 100%;
        border-radius: 8px;
    }

    .mkm-obras-slide {
        aspect-ratio: 1 / 1;
    }

    .mkm-obras-slider-arrow {
        width: 38px;
        height: 38px;
        font-size: 30px;
        line-height: 34px;
    }

    .mkm-obras-slider-prev {
        left: 10px;
    }

    .mkm-obras-slider-next {
        right: 10px;
    }

    .mkm-obras-slider-counter {
        right: 10px;
        bottom: 10px;
        font-size: 12px;
    }
}

.mkm-obra-volver-wrapper {
    width: 100%;
    margin: 40px auto 60px;
    text-align: center;
}

.mkm-obra-volver-btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 4px;
    background: #000;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.25s ease;
}

.mkm-obra-volver-btn:hover {
    background: #333;
    color: #fff;
    text-decoration: none;
}

.mkm-obras-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 18px;
    width: 100%;
    margin: 40px auto;
}

.mkm-obras-grid-item {
    position: relative;
    overflow: hidden;
    min-height: 280px;
    background: #111;
}

.mkm-obras-grid-link {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    min-height: 280px;
    overflow: hidden;
    text-decoration: none;
    color: #fff;
}

.mkm-obras-grid-bg {
    position: absolute;
    inset: 0;
    z-index: 1;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    transform: scale(1);
    transition: transform 0.55s ease;
}

.mkm-obras-grid-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.15);
    opacity: 0;
    transition: opacity 0.35s ease, background 0.35s ease;
}

.mkm-obras-grid-content {
    text-align: center;
    transform: translateY(12px);
    transition: transform 0.35s ease;
}

.mkm-obras-grid-title {
    margin: 0 0 8px;
    color: #fff;
    font-size: 22px;
    line-height: 1.2;
    font-weight: 700;
}

.mkm-obras-grid-fecha {
    margin: 0;
    color: #fff;
    font-size: 15px;
    line-height: 1.4;
    font-weight: 400;
}

.mkm-obras-grid-link:hover .mkm-obras-grid-bg {
    transform: scale(1.12);
}

.mkm-obras-grid-link:hover .mkm-obras-grid-overlay {
    opacity: 1;
    background: rgba(0, 0, 0, 0.45);
}

.mkm-obras-grid-link:hover .mkm-obras-grid-content {
    transform: translateY(0);
}

/* Tablet grande */
@media (max-width: 1200px) {
    .mkm-obras-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Tablet */
@media (max-width: 1024px) {
    .mkm-obras-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 15px;
    }

    .mkm-obras-grid-item,
    .mkm-obras-grid-link {
        min-height: 240px;
    }
}

/* Móvil */
@media (max-width: 767px) {
    .mkm-obras-grid {
        grid-template-columns: repeat(1, 1fr);
        gap: 14px;
        margin: 30px auto;
    }

    .mkm-obras-grid-item,
    .mkm-obras-grid-link {
        min-height: 260px;
    }

    .mkm-obras-grid-overlay {
        opacity: 1;
        background: rgba(0, 0, 0, 0.38);
    }

    .mkm-obras-grid-content {
        transform: translateY(0);
    }

    .mkm-obras-grid-title {
        font-size: 21px;
    }
}