/* Mas Nambos Construction - Official Brand Color Palette (Luxury Matte Black & Warm Bronze Gold) */
:root {
    --mn-gold: #C89955;
    --mn-gold-light: #E2BC7A;
    --mn-gold-dark: #9A7238;
    --mn-black: #121212;
    --mn-charcoal: #1f1f1f;
    --mn-slate: #333333;
    --mn-white: #ffffff;
}

.mn-services-grid-wrapper {
    width: 100%;
    margin: 0 auto;
    padding: 10px 0;
    box-sizing: border-box;
}

.mn-services-grid {
    display: grid;
    grid-template-columns: repeat(var(--mn-grid-desktop, 3), 1fr);
    gap: 25px;
    box-sizing: border-box;
}

/* =========================================================
   STYLE 1: OVERLAY PORTFOLIO CARD & BRAND COLOR PALETTE
   ========================================================= */

.mn-overlay-card {
    position: relative;
    height: 340px;
    border-radius: 16px;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.4s ease, border-color 0.4s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    text-decoration: none;
    box-sizing: border-box;
    border: 1px solid rgba(200, 153, 85, 0.2);
}

.mn-overlay-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 35px rgba(200, 153, 85, 0.25);
    border-color: #C89955;
}

/* Clickable Full Card Link Overlay */
.mn-overlay-card-link {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: block;
}

/* Before & After Interactive Container */
.mn-ba-container {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
    user-select: none;
    -webkit-user-select: none;
}

.mn-ba-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    user-drag: none;
    -webkit-user-drag: none;
    user-select: none;
    -moz-user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
    pointer-events: none;
}

.mn-ba-before-img {
    z-index: 1;
}

.mn-ba-after-img {
    z-index: 2;
    clip-path: polygon(50% 0, 100% 0, 100% 100%, 50% 100%);
    transition: clip-path 0.05s ease-out;
}

/* Interactive Slider Handle */
.mn-ba-handle {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 3px;
    background: #C89955;
    z-index: 5;
    cursor: ew-resize;
    transform: translateX(-50%);
    box-shadow: 0 0 10px rgba(0,0,0,0.8);
    user-select: none;
    -webkit-user-select: none;
}

.mn-ba-handle::after {
    content: '↔';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 28px;
    height: 28px;
    background: #121212;
    color: #C89955;
    border: 2px solid #C89955;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
    pointer-events: none;
}

/* Dark Matte Black Gradient Overlay */
.mn-overlay-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(18, 18, 18, 0.25) 0%, rgba(18, 18, 18, 0.6) 45%, rgba(18, 18, 18, 0.96) 100%);
    z-index: 2;
    pointer-events: none;
}

/* Category Pill Badge (Top-Left) - Warm Metallic Gold */
.mn-overlay-badge {
    position: relative;
    z-index: 4;
    align-self: flex-start;
    margin: 14px;
    background: linear-gradient(135deg, #C89955 0%, #9A7238 100%);
    color: #121212;
    font-size: 11px;
    font-weight: 800;
    padding: 5px 14px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    white-space: nowrap;
    max-width: calc(100% - 100px);
    overflow: hidden;
    text-overflow: ellipsis;
    pointer-events: none;
}

/* Bottom Overlay Content Box */
.mn-overlay-content {
    position: relative;
    z-index: 4;
    padding: 16px;
    color: #ffffff;
    pointer-events: auto;
}

.mn-overlay-title {
    font-size: 19px;
    font-weight: 700;
    margin: 0 0 6px 0;
    line-height: 1.3;
    text-shadow: 0 2px 4px rgba(0,0,0,0.6);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.mn-overlay-title a {
    color: #ffffff !important;
    text-decoration: none !important;
    transition: color 0.2s ease;
}

.mn-overlay-title a:hover {
    color: #C89955 !important;
}

.mn-overlay-excerpt {
    font-size: 12.5px;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.88);
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    pointer-events: none;
}

/* Bottom Meta Info Bar - Gold Highlights */
.mn-overlay-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.85);
    border-top: 1px solid rgba(200, 153, 85, 0.3);
    padding-top: 8px;
    margin-top: 4px;
    gap: 6px;
    pointer-events: none;
}

.mn-meta-left {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow: hidden;
}

.mn-meta-item {
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.mn-meta-item.loc-item {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mn-meta-item i {
    font-size: 10.5px;
    color: #C89955;
    flex-shrink: 0;
}

/* CLASSIC CARD STYLE */
.mn-service-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 25px 20px;
    transition: all 0.35s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
}

.mn-service-card:hover {
    border-color: #C89955;
    box-shadow: 0 12px 25px rgba(200, 153, 85, 0.15);
}

.mn-service-icon-box {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #1f1f1f 0%, #121212 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    color: #C89955;
    font-size: 24px;
    border: 1px solid rgba(200, 153, 85, 0.3);
}

.mn-service-title {
    font-size: 19px;
    font-weight: 700;
    color: #121212;
    margin: 0 0 6px 0;
}

.mn-service-title a {
    color: #121212;
    text-decoration: none;
}

.mn-service-title a:hover {
    color: #C89955;
}

.mn-service-subtitle {
    font-size: 12px;
    font-weight: 700;
    color: #C89955;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.mn-service-excerpt {
    font-size: 14px;
    line-height: 1.5;
    color: #475569;
    margin-bottom: 20px;
}

.mn-service-cta {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13.5px;
    font-weight: 700;
    color: #121212;
    text-decoration: none;
    padding: 10px 16px;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.mn-service-cta:hover {
    background: #121212;
    color: #C89955;
    border-color: #121212;
}

/* RESPONSIVE QUERIES */
@media (max-width: 991px) {
    .mn-services-grid {
        grid-template-columns: repeat(var(--mn-grid-tablet, 2), 1fr);
        gap: 16px;
    }
    .mn-overlay-card {
        height: 310px;
    }
    .mn-overlay-title {
        font-size: 17px;
    }
}

@media (max-width: 767px) {
    .mn-services-grid {
        grid-template-columns: repeat(var(--mn-grid-mobile, 1), 1fr);
        gap: 12px;
    }

    .mn-overlay-card {
        height: 290px;
        border-radius: 14px;
    }

    .mn-overlay-badge {
        margin: 10px;
        font-size: 9.5px;
        padding: 4px 9px;
        border-radius: 12px;
    }

    .mn-overlay-content {
        padding: 12px;
    }

    .mn-overlay-title {
        font-size: 14.5px;
        line-height: 1.25;
        margin-bottom: 4px;
        -webkit-line-clamp: 2;
    }

    .mn-overlay-excerpt {
        font-size: 11px;
        line-height: 1.35;
        margin-bottom: 8px;
        -webkit-line-clamp: 2;
    }

    .mn-overlay-meta {
        font-size: 9.5px;
        padding-top: 6px;
        margin-top: 4px;
        gap: 4px;
    }
}
