/* Estilos del carrusel de PROYECTOS relacionados */
.my-proj-related-section {
    margin-top: 60px;
    padding: 20px 0;
    max-width: 1800px; 
    margin-left: auto;
    margin-right: auto;
    padding-left: 20px;
    padding-right: 20px;
}

.my-proj-related-section h3 {
    font-family: arial, sans-serif;
    font-weight: 400;
    color: #353535;
    font-size: min(1.67vw, 32px);
    letter-spacing: 0.1em;
    margin-bottom: 30px;
    text-transform: uppercase;
}

.my-proj-slider-container {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0;
    width: 100%;
}

/* Flechas de navegación */
.my-proj-slider-arrow {
    background: transparent;
    border: 2px solid #ddd;
    width: 50px;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    font-size: 20px;
    color: #7E7E7E;
    transition: all 0.3s ease;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    border-radius: 0PX !important;
    z-index: 10;
}

.my-proj-left-arrow {
    left: -70px;
}

.my-proj-right-arrow {
    right: -70px;
}

.my-proj-slider-arrow:hover {
    background-color: #7E7E7E;
    color: #fff;
    border-color: #7E7E7E;
}

/* Contenedor deslizante */
.my-proj-slider-wrapper {
    display: flex;
    gap: 20px; /* Espacio entre imágenes */
    overflow-x: hidden; /* Oculta lo que se sale */
    scroll-behavior: smooth;
    width: 100%;
    padding: 10px 0;
    transform: translateX(0);
    align-items: flex-start;
    justify-content: flex-start;
}

/* LA TARJETA (CARD) */
.my-proj-post-card {
    background-color: #fff;
    transition: transform 0.3s ease;
    
    /* === FUERZA BRUTA PARA EL TAMAÑO === */
    flex: 0 0 406px !important;    /* No crecer, no encoger, base 406px */
    width: 406px !important;       /* Ancho forzado */
    min-width: 406px !important;   /* Ancho mínimo forzado */
    max-width: 406px !important;   /* Ancho máximo forzado */
    
    display: flex;
    flex-direction: column;
    margin: 0 !important; /* El margen lo maneja el gap del wrapper */
}

.my-proj-post-card:hover {
    transform: translateY(-5px);
}

.my-proj-post-card a {
    text-decoration: none;
    color: inherit;
    display: block;
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* EL CONTENEDOR DE LA IMAGEN */
.my-proj-image-wrapper {
    position: relative;
    width: 100%;
    
    /* === ALTO FORZADO === */
    height: 406px !important;
    min-height: 406px !important;
    
    overflow: hidden;
    padding: 0 !important;
    margin: 0 !important;
}

/* LA IMAGEN EN SÍ */
.my-proj-image-wrapper img {
    width: 100% !important;
    height: 100% !important;
    
    /* Esto es clave para que no se vea aplastada */
    object-fit: cover !important; 
    object-position: center !important;
    
    /* Reseteamos estilos que suelen poner los temas */
    max-width: none !important; 
    min-width: 100% !important;
    display: block !important;
    border: none !important;
}

.my-proj-placeholder-image {
    width: 100%;
    height: 100%;
    background-color: #eee;
}

/* Responsive: Solo en pantallas pequeñas permitimos que cambie */
@media (max-width: 1300px) {
    /* Si la pantalla es menor a 1300px, quizás 406px sea muy grande para caber 3.
       Aquí decides si quieres que hagan scroll horizontal manteniendo 406px
       o si prefieres que se achiquen. 
       
       MANTENEMOS 406px FIJO PARA QUE SE VEA COMO QUIERES, EL USUARIO HARÁ SCROLL CON LAS FLECHAS.
    */
}

@media (max-width: 768px) {
    /* En móviles, sí debemos dejar que ocupe el ancho de la pantalla */
    .my-proj-post-card {
        flex: 0 0 100% !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
    }
    
    .my-proj-image-wrapper {
        height: auto !important;
        aspect-ratio: 1 / 1; /* Mantiene cuadrado en móvil */
    }

    .my-proj-related-section h3 {
        font-size: min(4vw, 24px);
    }
    
    .my-proj-slider-arrow {
        visibility: visible !important;
        width: 40px;
        height: 40px;
        font-size: 16px;
    }

    .my-proj-left-arrow {
        left: 10px;
        background: rgba(255,255,255,0.8);
    }

    .my-proj-right-arrow {
        right: 10px;
        background: rgba(255,255,255,0.8);
    }
}

/* === ESTILOS PARA EL HOVER CON TEXTO === */

/* Asegura que el contenedor de la imagen sea relativo para posicionar el overlay absoluto */
.my-proj-image-wrapper {
    position: relative; /* Ya estaba, pero lo reconfirmamos */
}

/* El contenido del texto que se mostrará */
.my-proj-card-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7); /* Superposición oscura */
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 20px;
    opacity: 0; /* Por defecto OCULTO */
    visibility: hidden; /* Oculto completamente */
    transition: opacity 0.3s ease, visibility 0.3s ease; /* Transición suave */
    pointer-events: none; /* No bloquear clics en el enlace */
}

/* Título y texto dentro del overlay */
.my-proj-card-content h4 {
    color: #fff;
    font-size: 24px;
    margin-bottom: 10px;
}

.my-proj-card-content p {
    color: #f0f0f0;
    font-size: 16px;
    margin: 0;
}

/* Efecto al pasar el ratón (HOVER) */
.my-proj-post-card a:hover .my-proj-card-content {
    opacity: 1; /* Mostrar */
    visibility: visible;
}

/* Opcional: Para mantener el efecto de elevación original */
.my-proj-post-card:hover {
    transform: translateY(-5px);
}