/**
 * Widget Proyecto Arquitectura - Estilos CSS
 * Version: 1.0.0
 */

.proyecto-arquitectura-widget {
    width: 100%;
}

/* CARRUSEL FULL WIDTH - MODIFICADO PARA IMAGEN COMPLETA */
.carousel-fullwidth {
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    margin-bottom: 50px;
}

.carousel-container {
    position: relative;
    width: 100%;
    height: auto; /* Cambiado de altura fija a automática */
    overflow: hidden;
    background: #000;
    min-height: 400px; /* Altura mínima para evitar colapso */
}

.carousel-wrapper {
    position: relative;
    width: 100%;
    height: auto; /* Altura automática */
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    display: flex; /* Nuevo: para centrar la imagen */
    align-items: center; /* Centrar verticalmente */
    justify-content: center; /* Centrar horizontalmente */
}

.carousel-slide.active {
    opacity: 1;
}

.carousel-slide img {
    width: auto; /* Ancho automático */
    height: auto; /* Alto automático */
    max-width: 100%; /* Máximo 100% del contenedor */
    max-height: 100vh; /* Máximo 100% de la altura de la ventana */
    object-fit: contain; /* Cambiado de 'cover' a 'contain' para mostrar imagen completa */
}

.carousel-prev,
.carousel-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    font-size: 40px;
    padding: 15px 20px;
    cursor: pointer;
    z-index: 10;
    transition: background 0.3s;
    line-height: 1;
    border-radius: 4px;
}

.carousel-prev:hover,
.carousel-next:hover {
    background: rgba(0, 0, 0, 0.8);
}

.carousel-prev {
    left: 20px;
}

.carousel-next {
    right: 20px;
}

.carousel-dots {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    z-index: 10;
}

.dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: background 0.3s;
    border: 2px solid rgba(255, 255, 255, 0.8);
}

.dot.active,
.dot:hover {
    background: rgba(255, 255, 255, 1);
}

/* CONTENEDOR CON MAX-WIDTH */
.proyecto-content-wrapper {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* CONTENIDO */
.proyecto-content {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 40px;
    align-items: start;
}

/* DESCRIPCIÓN */
.descripcion-section {
    padding: 20px;
}

.descripcion-titulo {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #333;
}

.descripcion-texto {
    font-size: 16px;
    line-height: 1.8;
    color: #666;
    margin-bottom: 30px;
}

.imagen-final-container {
    width: 100%;
    margin-top: 20px;
}

.imagen-final-container img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

/* SIDEBAR DETALLES */
.detalles-sidebar {
    background: #f8f8f8;
    padding: 30px;
    border-radius: 8px;
    position: sticky;
    top: 20px;
}

/* BOTÓN HOME */
.home-button-container {
    display: flex;
    justify-content: center;
    margin-top: 30px;
    padding-top: 25px;
    border-top: 1px solid #e0e0e0;
}

.btn-home {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: #000;
    color: #fff;
    padding: 12px 30px;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-home:hover {
    background-color: #333;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.btn-home-icon {
    font-size: 16px;
}

.proyecto-nombre {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 30px;
    line-height: 1.2;
    color: #000;
}

.detalles-lista {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.detalle-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.detalle-icono {
    font-size: 24px;
    color: #000;
    flex-shrink: 0;
    width: 30px;
    text-align: center;
}

.detalle-content {
    flex: 1;
}

.detalle-etiqueta {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #999;
    margin-bottom: 5px;
}

.detalle-valor {
    font-size: 16px;
    font-weight: 500;
    color: #333;
    line-height: 1.4;
}

/* RESPONSIVE - MODIFICADO PARA IMAGEN COMPLETA */
@media (max-width: 1024px) {
    .proyecto-content {
        grid-template-columns: 1fr 300px;
        gap: 30px;
    }

    .proyecto-nombre {
        font-size: 28px;
    }

    .carousel-container {
        min-height: 350px; /* Altura mínima ajustada */
    }
}

@media (max-width: 768px) {
    .proyecto-content {
        grid-template-columns: 1fr;
    }

    .detalles-sidebar {
        position: static;
        order: -1;
    }

    .carousel-container {
        min-height: 300px; /* Altura mínima para tablets */
    }

    .carousel-slide img {
        max-height: 80vh; /* Reducir altura máxima en tablets */
    }

    .proyecto-nombre {
        font-size: 32px;
        text-align: center;
    }

    .detalles-lista {
        gap: 20px;
    }

    .carousel-prev,
    .carousel-next {
        font-size: 30px;
        padding: 10px 15px;
    }

    .carousel-prev {
        left: 10px;
    }

    .carousel-next {
        right: 10px;
    }
}

@media (max-width: 480px) {
    .carousel-container {
        min-height: 250px; /* Altura mínima para móviles */
    }

    .carousel-slide img {
        max-height: 70vh; /* Reducir más en móviles pequeños */
    }

    .proyecto-nombre {
        font-size: 24px;
    }

    .detalles-sidebar {
        padding: 20px;
    }

    .carousel-prev,
    .carousel-next {
        font-size: 24px;
        padding: 8px 12px;
    }

    .carousel-fullwidth {
        margin-bottom: 30px;
    }
}

/* Estilos para asegurar que las imágenes se carguen correctamente */
.carousel-slide img[src] {
    display: block;
}

/* Ajuste para cuando la imagen es más alta que ancha */
.carousel-slide img.portrait {
    max-height: 90vh;
    width: auto;
}

/* Ajuste para cuando la imagen es más ancha que alta */
.carousel-slide img.landscape {
    max-width: 100%;
    height: auto;
}