/*
 * Sistema de Proteção de Imagens AMS Realty
 * Marca d'água CSS com proporção fixa universal
 */

/* ==========================================
   MARCA D'ÁGUA UNIVERSAL
   ========================================== */

.watermarked-image {
    position: relative;
    display: inline-block;
    width: 100%;
    overflow: hidden;
}

.watermarked-image img {
    display: block;
    width: 100%;
    height: auto;
    /* Desabilitar seleção e drag */
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    pointer-events: none;
}

/* Marca d'água centralizada - proporção fixa 35% */
.watermarked-image::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 35%;              /* Proporção em relação à imagem */
    height: 35%;
    background-image: url('/static/images/watermark.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0.25;           /* Transparência da marca */
    pointer-events: none;
    z-index: 2;
}

/* ==========================================
   AJUSTES PARA SLIDESHOW E GALERIA
   ========================================== */

/* Hero image: mantém estilo original */
.hero-image.watermarked-image {
    display: block;
    height: 90vh;
    width: 100%;
}

.hero-image.watermarked-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
    pointer-events: auto;
}

/* Slideshow: wrapper deve se adaptar ao tamanho da imagem */
.slideshow-mode .watermarked-image {
    display: flex;
    width: auto;
    height: auto;
    max-width: calc(100vw - 120px);
    max-height: calc(100vh - 220px);
}

.slideshow-mode .watermarked-image img {
    width: auto;
    height: auto;
    max-width: calc(100vw - 120px);
    max-height: calc(100vh - 220px);
    object-fit: contain;
}

/* Grid: wrapper ocupa 100% do grid item */
.grid-image-item .watermarked-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.grid-image-item .watermarked-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Floor plans */
.floor-plan-image-area .watermarked-image {
    width: 100%;
    height: 100%;
}

.floor-plan-image-area .watermarked-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* ==========================================
   PROTEÇÕES ANTI-DOWNLOAD
   ========================================== */

/* Desabilitar clique direito em imagens */
.watermarked-image {
    -webkit-touch-callout: none;
}

/* Classe auxiliar para desabilitar seleção global */
.no-select {
    user-select: none !important;
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
}
