.filter-black {
    filter: brightness(0);
}

.filter-white {
    filter: brightness(0) invert(1);
}

.dm-page-pad {
    width: 100%;
    padding-left: 3.75rem;
    padding-right: 3.75rem;
}

.dm-hero-carousel,
.dm-hero-carousel .carousel-inner,
.dm-hero-carousel .carousel-item {
    height: 100vh;
    min-height: 720px;
}

.dm-hero-carousel .carousel-item img,
.dm-hero-page > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.dm-hero-carousel .carousel-item::after,
.dm-hero-page::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 34%;
    background: linear-gradient(to top, rgba(0, 0, 0, .46), rgba(0, 0, 0, 0));
    pointer-events: none;
}

.dm-hero-caption,
.dm-hero-title {
    position: absolute;
    left: 3.75rem;
    bottom: 5.5rem;
    z-index: 2;
    color: #fff;
    text-transform: uppercase;
}

.dm-hero-caption h1,
.dm-hero-title h1 {
    margin: 0 0 .55rem;
    font-size: 2.15rem;
    font-weight: 300;
    line-height: 1.15;
    letter-spacing: .34em;
}

.dm-hero-caption span,
.dm-hero-title span {
    display: inline-flex;
    align-items: center;
    gap: .7rem;
    font-size: .7rem;
    letter-spacing: .44em;
}

.dm-hero-caption span::before,
.dm-hero-title span::before,
.dm-card-subtitle::before {
    content: "";
    width: 2.15rem;
    height: 1px;
    background: currentColor;
    opacity: .82;
}

.dm-hero-page {
    position: relative;
    height: 100vh;
    min-height: 720px;
    overflow: hidden;
}

.dm-hero-logo-mark {
    position: absolute;
    left: 5.5rem;
    bottom: 5.3rem;
    z-index: 2;
    color: #fff;
}

.dm-hero-logo-mark img {
    width: 230px;
    max-height: 90px;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

.dm-hero-logo-mark span,
.dm-centered-brand span,
.dm-top-logo span {
    display: block;
    font-size: 2.2rem;
    font-weight: 300;
    letter-spacing: .08em;
    text-transform: lowercase;
}

.dm-home-intro {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: #fff;
    padding: 9rem 0 8rem;
}

.dm-home-statement {
    margin: 0;
    color: #202020;
    font-size: 3.6rem;
    font-weight: 300;
    line-height: 1.03;
}

.dm-home-statement strong,
.dm-home-statement .fw-bold {
    font-weight: 700;
}

.dm-copy-block {
    color: #3c3c3c;
    font-size: 1rem;
    font-weight: 300;
    line-height: 1.85;
    text-align: justify;
}

.dm-copy-block p + p {
    margin-top: 2rem;
}

/*
 * Cierre del bloque de inicio: las dos marcas (Dionne Arquitectos y Murillo
 * Interiores) enlazadas con su logo y, debajo y centrado, el logo conjunto.
 */
.dm-home-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4.5rem;
    margin-top: 7.5rem;
}

.dm-home-links img {
    width: 250px;
    max-height: 72px;
    object-fit: contain;
    filter: brightness(0);
}

.dm-home-brands {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12rem;
    flex-wrap: wrap;
    width: 100%;
}

.dm-home-brands .dm-home-brand {
    display: block;
    line-height: 0;
}

.dm-home-brands .dm-home-brand img {
    width: 190px;
    max-height: 64px;
    transition: opacity .25s ease;
}

.dm-home-brands .dm-home-brand:hover img {
    opacity: .62;
}

.dm-home-brand-mark img {
    width: 210px;
    max-height: 66px;
}

.dm-home-links a,
.dm-category-filter a,
.dm-sticky-tabs a {
    color: #111;
    text-decoration: none;
    text-transform: uppercase;
    font-size: .8rem;
    font-weight: 300;
    letter-spacing: .46em;
    transition: color .25s ease, opacity .25s ease;
}

.dm-home-links a:hover,
.dm-category-filter a:hover,
.dm-sticky-tabs a:hover {
    color: #000;
    opacity: .62;
}

.dm-portfolio-block {
    background: #fff;
    padding: 6.5rem 0 3rem;
}

.dm-section-head {
    display: grid;
    grid-template-columns: minmax(260px, 34%) 1fr;
    gap: 2rem;
    align-items: end;
    margin-bottom: 3.6rem;
}

.dm-section-head h2,
.dm-developed-projects h2,
.dm-awards h2 {
    margin: 0;
    color: #050505;
    font-size: 2rem;
    font-weight: 300;
    line-height: 1.35;
    letter-spacing: .2em;
    text-transform: uppercase;
}

.dm-category-filter {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 1.4rem 2rem;
}

.dm-category-filter a {
    color: #b4b4b4;
    font-size: .7rem;
    letter-spacing: .44em;
}

.dm-category-filter a.active,
.dm-category-filter a:hover {
    color: #111;
    text-decoration: underline;
    text-underline-offset: .35rem;
}



.dm-portfolio-card {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    overflow: hidden;
    min-height: 252px;
    background: #111;
    text-decoration: none;
    color: #fff;
    aspect-ratio: 16 / 7;
}

.dm-portfolio-card img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(1) brightness(1.12);
    transition: transform .6s ease, filter .6s ease;
    z-index: 0;
}

.dm-portfolio-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, .4) 0%, rgba(0, 0, 0, .08) 34%, rgba(0, 0, 0, 0) 62%);
    z-index: 1;
}

.dm-portfolio-card:hover img {
    transform: scale(1.035);
    filter: grayscale(1) brightness(1.18);
}

.dm-card-title,
.dm-card-subtitle {
    position: relative;
    z-index: 2;
    color: #fff;
    text-transform: uppercase;
}

.dm-card-title {
    font-size: 1rem;
    font-weight: 300;
    line-height: 1.35;
    letter-spacing: 0.1em;
}

.dm-card-subtitle {
    margin-top: .45rem;
    display: flex;
    align-items: center;
    gap: .45rem;
    font-size: .58rem;
    font-weight: 300;
    letter-spacing: .36em;
}

.dm-card-link {
    text-decoration: none;
}

.dm-empty-state {
    min-height: 45vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.dm-chronology {
    column-gap: 3rem;
}

.dm-project-specs li {
    gap: 1rem;
}

.dm-category-intro,
.dm-study-intro {
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 7.5rem 0 8.5rem;
    background: #fff;
}

.dm-centered-brand {
    margin-bottom: 4rem;
}

.dm-centered-brand img,
.dm-study-intro img,
.dm-top-logo img {
    width: 270px;
    max-height: 96px;
    object-fit: contain;
    filter: brightness(0);
}

.dm-category-intro h1,
.dm-study-intro h1 {
    margin: 0 auto 3rem;
    max-width: 980px;
    color: #050505;
    font-size: 2.05rem;
    font-weight: 300;
    line-height: 1.6;
    letter-spacing: .43em;
    text-transform: uppercase;
}

.dm-category-intro p,
.dm-study-intro p,
.dm-gallery-category-head p {
    max-width: 1060px;
    margin: 0 auto;
    color: #b6b6b6;
    font-size: 1.15rem;
    font-weight: 300;
    line-height: 2.25;
    letter-spacing: .34em;
}

.dm-sticky-tabs {
    position: sticky;
    top: 72px;
    z-index: 1000;
    display: flex;
    gap: 4rem;
    align-items: center;
    min-height: 72px;
    padding: 0 3.75rem;
    background: #fff;
    border-bottom: 1px solid #f1f1f1;
}

.dm-sticky-tabs a {
    color: #b4b4b4;
}

.dm-sticky-tabs a:first-child {
    color: #111;
}

.dm-featured-projects,
.dm-project-gallery {
    padding: 7rem 0 4rem;
    background: #fff;
}

.dm-section-title-center {
    margin-bottom: 4rem;
    text-align: center;
    text-transform: uppercase;
}

.dm-section-title-center span {
    display: block;
    margin-bottom: .9rem;
    color: #b8b8b8;
    font-size: .7rem;
    letter-spacing: .48em;
}

.dm-section-title-center h2 {
    margin: 0;
    color: #111;
    font-size: 2.05rem;
    font-weight: 300;
    letter-spacing: .42em;
}

.dm-developed-projects {
    padding: 5rem 0 7rem;
    background: #fff;
}

.dm-developed-projects h2 {
    font-size: 1.55rem;
    line-height: 1.8;
    margin-bottom: 3.6rem;
}

.dm-developed-projects img {
    width: 100%;
    min-height: 0;
    object-fit: cover;
}

.dm-developed-projects .dm-portfolio-card:hover img {
    transform: none;
    filter: grayscale(1) brightness(1.12);
}

.dm-project-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 3.6rem 4rem;
}

.dm-project-list a {
    color: #aaa;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: .38em;
    line-height: 1.7;
    transition: all 0.3s ease;
}

.dm-project-list strong {
    display: block;
    color: #999;
    font-size: .78rem;
    font-weight: 700;
    transition: color 0.3s ease;
}

.dm-project-list span {
    display: block;
    white-space: pre-line;
    font-size: .75rem;
    font-style: normal;
}

.dm-project-list a:hover,
.dm-project-list a.active {
    color: #000;
}

.dm-project-list a:hover strong,
.dm-project-list a.active strong {
    color: #000;
}

.dm-gallery-category-head {
    padding: 9rem 0 5rem;
    background: #fff;
}

.dm-gallery-topline {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 2rem;
    margin-bottom: 6rem;
}

.dm-gallery-topline h1 {
    margin: 0 0 .8rem;
    font-size: 2rem;
    font-weight: 300;
    letter-spacing: .42em;
    text-transform: uppercase;
}

.dm-gallery-topline span {
    color: #b2b2b2;
    font-size: .7rem;
    letter-spacing: .42em;
    text-transform: uppercase;
}

.dm-masonry-gallery,
.dm-project-gallery {
    background: #fff;
}

.dm-masonry-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 1.75rem;
}

.dm-gallery-tile {
    grid-column: span 4;
    min-height: 370px;
    padding: 0;
    border: 0;
    background: transparent;
    overflow: hidden;
}

.dm-gallery-tile:nth-child(5n + 1) {
    grid-column: span 4;
    grid-row: span 2;
    min-height: 768px;
}

.dm-gallery-tile:nth-child(5n + 2) {
    grid-column: span 5;
}

.dm-gallery-tile:nth-child(5n + 3) {
    grid-column: span 3;
}

.dm-gallery-tile:nth-child(5n + 4),
.dm-gallery-tile:nth-child(5n) {
    grid-column: span 4;
}

.dm-gallery-tile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .45s ease, filter .45s ease;
}

/*
 * Galería justificada (proyecto): cada imagen aporta su proporción real
 * (--dm-ratio) y las filas se reparten el ancho completo. Los topes evitan
 * que una imagen suelta se estire más allá de su resolución original.
 */
.dm-justified-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 1.75rem;
}

.dm-justified-gallery .dm-gallery-tile {
    --dm-alto-base: 24rem;
    --dm-alto-max: 32rem;
    flex: var(--dm-ratio, 1.5) 1 calc(var(--dm-ratio, 1.5) * var(--dm-alto-base));
    max-width: min(100%, var(--dm-ancho-real, 100%), calc(var(--dm-ratio, 1.5) * var(--dm-alto-max)));
    aspect-ratio: var(--dm-ratio, 1.5);
    min-height: 0;
    grid-column: auto;
    grid-row: auto;
}

.dm-justified-gallery .dm-gallery-tile img {
    height: 100%;
    object-fit: cover;
}

.dm-gallery-tile:hover img {
    transform: scale(1.025);
}

@media (max-width: 991.98px) {
    .dm-justified-gallery .dm-gallery-tile {
        --dm-alto-base: 18rem;
        --dm-alto-max: 24rem;
    }
}

.dm-project-detail {
    padding: 7.5rem 0 8rem;
    background: #fff;
}

.dm-project-detail > .dm-page-pad > .row {
    align-items: flex-start;
}

.dm-project-detail span {
    display: block;
    margin-bottom: 3rem;
    color: #b5b5b5;
    font-size: .75rem;
    font-weight: 300;
    letter-spacing: .45em;
    text-transform: uppercase;
}

.dm-spec-list > div {
    display: grid;
    grid-template-columns: 44% 1fr;
    gap: 1rem;
    align-items: center;
    padding: 1.4rem 0;
    border-bottom: 1px solid #bfbfbf;
}

.dm-spec-list > div:first-child {
    border-top: 1px solid #bfbfbf;
}

.dm-spec-list strong,
.dm-spec-list em {
    color: #111;
    font-size: .85rem;
    font-style: normal;
    font-weight: 300;
    letter-spacing: .38em;
    text-transform: uppercase;
}

.dm-spec-list strong {
    font-weight: 700;
}

.dm-project-detail h1 {
    margin: 0;
    color: #111;
    font-size: 2.1rem;
    font-weight: 300;
    letter-spacing: .42em;
    text-transform: uppercase;
}

.dm-project-detail small {
    display: inline-flex;
    align-items: center;
    gap: .75rem;
    margin: .7rem 0 3rem;
    color: #999;
    font-size: .62rem;
    letter-spacing: .36em;
    text-transform: uppercase;
}

.dm-project-detail small::before {
    content: "";
    width: 2.2rem;
    height: 1px;
    background: currentColor;
}

.dm-project-detail p {
    max-width: 780px;
    color: #333;
    font-size: 1.05rem;
    font-weight: 300;
    line-height: 2;
    letter-spacing: .18em;
}

.dm-bottom-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2rem;
    padding: 6rem 3.75rem 4rem;
    background: #fff;
}

.dm-bottom-nav div:last-child {
    text-align: right;
}

.dm-bottom-nav span {
    display: block;
    margin-bottom: .75rem;
    color: #bebebe;
    font-size: .65rem;
    letter-spacing: .42em;
    text-transform: uppercase;
}

.dm-bottom-nav a {
    color: #111;
    text-decoration: none;
    font-size: .85rem;
    font-weight: 300;
    letter-spacing: .42em;
    text-transform: uppercase;
}

.dm-study-intro {
    padding-top: 8rem;
}

.dm-study-intro img {
    margin-bottom: 4.5rem;
}

.dm-founders {
    padding: 5rem 0 7rem;
    background: #fff;
}

.dm-founders article > img,
.dm-avatar-placeholder {
    width: 145px;
    height: 145px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    margin-bottom: 3rem;
    background: #e9e9e9;
}

.dm-avatar-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #777;
    font-size: 1.3rem;
    letter-spacing: .22em;
}

.dm-founders h2 {
    margin: 0 0 2.8rem;
    color: #111;
    font-size: 1.8rem;
    font-weight: 300;
    letter-spacing: .45em;
    text-transform: uppercase;
}

.dm-founders p,
.dm-awards p {
    color: #b3b3b3;
    font-size: 1.02rem;
    font-weight: 300;
    line-height: 2.15;
    letter-spacing: .27em;
}

.dm-study-portfolio {
    padding-top: 5rem;
}

.dm-awards {
    min-height: 50vh;
    padding: 5rem 0 8rem;
    background: #fff;
}

.dm-awards h2 {
    margin-bottom: 3rem;
}

@media (max-width: 767.98px) {
    .dm-page-pad,
    .dm-sticky-tabs,
    .dm-bottom-nav {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }

    header.navbar {
        padding-left: 1.5rem !important;
        padding-right: 1.5rem !important;
    }

    .ls-ultra {
        letter-spacing: 0.28em;
    }

    #heroCarousel .carousel-caption {
        padding-left: 1.5rem !important;
        padding-right: 1.5rem !important;
    }

    .dm-hero-carousel,
    .dm-hero-carousel .carousel-inner,
    .dm-hero-carousel .carousel-item,
    .dm-hero-page {
        min-height: 620px;
    }

    .dm-hero-caption,
    .dm-hero-title {
        left: 1.5rem;
        bottom: 4rem;
        max-width: calc(100% - 3rem);
    }

    .dm-hero-caption h1,
    .dm-hero-title h1,
    .dm-section-head h2,
    .dm-category-intro h1,
    .dm-study-intro h1,
    .dm-gallery-topline h1,
    .dm-project-detail h1 {
        font-size: 1.55rem;
        letter-spacing: .24em;
    }

    .dm-home-statement {
        font-size: 2.35rem;
    }

    .dm-gallery-topline {
        align-items: flex-start;
        flex-direction: column;
    }

    .dm-home-links {
        gap: 3rem;
    }

    .dm-home-brands {
        flex-direction: column;
        gap: 2.5rem;
    }

    .dm-home-brands .dm-home-brand img {
        width: 160px;
    }

    .dm-home-brand-mark img {
        width: 180px;
    }

    .dm-section-head,
    .dm-project-list,
    .dm-bottom-nav {
        grid-template-columns: 1fr;
    }

    .dm-category-filter {
        justify-content: flex-start;
    }

    .dm-portfolio-card {
        aspect-ratio: 4 / 3;
    }

    .dm-sticky-tabs {
        top: 66px;
        gap: 1.5rem;
        overflow-x: auto;
    }

    .dm-sticky-tabs a,
    .dm-category-filter a,
    .dm-home-links a,
    .dm-bottom-nav a {
        letter-spacing: .28em;
        white-space: nowrap;
    }

    .dm-category-intro p,
    .dm-study-intro p,
    .dm-gallery-category-head p,
    .dm-founders p,
    .dm-project-detail p {
        font-size: .95rem;
        line-height: 2;
        letter-spacing: .12em;
    }

    .dm-masonry-grid {
        grid-template-columns: 1fr;
    }

    .dm-gallery-tile {
        grid-column: auto !important;
        grid-row: auto !important;
        min-height: 360px !important;
    }

    .dm-justified-gallery .dm-gallery-tile {
        flex-basis: 100%;
        max-width: 100%;
        min-height: 0 !important;
    }

    .dm-bottom-nav div:last-child {
        text-align: left;
    }
}

/* Lightbox close button styling */
#lightboxModal .btn-close {
    opacity: 1 !important;
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 50%;
    padding: 0.75rem;
    transition: background-color 0.25s ease, transform 0.25s ease;
}

#lightboxModal .btn-close:hover {
    background-color: rgba(0, 0, 0, 0.85);
    transform: scale(1.1);
}

/* --- SELECTOR DE IDIOMA --- */
/* Aparece en dos lugares con el mismo marcado: en el header fijo, junto al
   icono de menú, y dentro del panel del menú, sobre los enlaces. */
.dm-lang-switch {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.7rem;
    font-weight: 300;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    line-height: 1;
    white-space: nowrap;
}

.dm-lang-option {
    text-decoration: none !important;
    color: inherit !important;
    opacity: 0.45;
    transition: opacity 0.4s ease;
}

.dm-lang-option:hover {
    opacity: 1;
}

.dm-lang-option.is-active {
    opacity: 1;
}

.dm-lang-sep {
    opacity: 0.3;
}

/* El header cambia de fondo según la página: el selector sigue ese contraste,
   igual que ya lo hacen el logo y las líneas del icono de menú. */
.dm-lang-switch-light {
    color: var(--dm-white);
}

.dm-lang-switch-dark {
    color: var(--dm-black);
}

/* Dentro del panel del menú, que siempre es claro. */
.dm-lang-switch-menu {
    color: var(--dm-black);
    justify-content: center;
    width: 100%;
    margin-top: 1.75rem;
}

@media (max-width: 575.98px) {
    .dm-lang-switch {
        font-size: 0.62rem;
        letter-spacing: 0.16em;
        gap: 0.35rem;
    }
}
