/* FUENTES Y BASE */
body {
    font-family: 'Montserrat', sans-serif;
    background-color: #fff;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
	padding-top: 0px;
}

main { flex: 1; }

.seo-title {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* NAVBAR */
.navbar-brand { font-weight: 300; letter-spacing: -0.5px; font-size: 1.5rem; }
.nav-link { font-weight: 300; font-size: 0.9rem; color: #000 !important; }
.nav-link.active { text-underline-offset: 5px; }

/* LISTADO: GRID DE PROYECTOS */
.project-item {
    position: relative;
    width: 100%;
    padding-bottom: 100%;
    overflow: hidden;
    background-color: #f0f0f0;
}
.project-item img {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

/* EFECTO HOVER (REPLICA CUADRO 3) */
.project-hover-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(255, 255, 255, 0.75);
    display: flex; align-items: center; justify-content: center;
    text-align: center; padding: 20px;
    opacity: 0;
    transition: opacity 0.4s ease-in-out;
    z-index: 10;
}
.project-title { color: #000; font-weight: 400; font-size: 1.8rem; margin: 0; }
.project-item:hover .project-hover-overlay { opacity: 1; }

/* DETALLE: BLOQUE COMPACTO DE IMÁGENES */

/* Contenedor principal con márgenes laterales reducidos */
.main-wrapper {
    padding-left: 5%; /* Margen lateral pequeño y elegante */
    padding-right: 5%;
}

/* Fila de la galería sin espacios entre columnas */
.gallery-compact {
    display: flex;
    flex-wrap: wrap;
    margin: 0; /* Elimina márgenes negativos de Bootstrap */
}

.gallery-compact .col-md-4 {
    padding: 0; /* Elimina el espacio (gutter) entre las fotos */
}

.gallery-compact .img-detalle-link {
    cursor: pointer;
    overflow: hidden;
    width: 100%;
    aspect-ratio: 1 / 1; /* Esto hace que sean cuadrados */
}

.gallery-compact img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Corta la imagen para rellenar el cuadrado sin estirarse */
    transition: opacity 0.3s ease;
}

.gallery-compact img:hover {
    opacity: 0.8;
}

/* Ajuste para el carrusel en el modal para que no se vea gigante */
.carousel-control-prev {
	width:35px;
}
.carousel-control-next {
	width:35px;
}
@media (min-width: 1200px) {
  .modal-xl {
    --bs-modal-width: 1440px;
  }
}
.modal-content img {
    max-height: 85vh;
    object-fit: contain;
}

.img-detalle-link { 
    cursor: pointer; 
    position: relative; 
    display: block; 
    overflow: hidden;
    width: 100%;
}

.img-detalle-link img {
    width: 100%;
    display: block; /* Elimina espacio inferior residual */
    transition: transform 0.6s ease;
}

/* Superposición blanca al 70% (Fade) centrada */
.img-detalle-link::after {
    content: "VER";
    position: absolute; 
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(255, 255, 255, 0.7); 
    display: flex; 
    align-items: center; 
    justify-content: center;
    color: #000; 
    font-weight: 300; 
    letter-spacing: 2px;
    opacity: 0; 
    transition: opacity 0.3s ease;
    z-index: 2;
}

.img-detalle-link:hover::after { opacity: 1; }

/* Estilo de flecha */
.btn-toggle-info {
    transition: transform 0.3s ease;
    cursor: pointer; background: none; border: none; font-size: 2rem;
}
.btn-toggle-info[aria-expanded="true"] { transform: rotate(180deg); }

/* PÁGINA NOSOTROS: DISEÑO ESPECÍFICO */

/* Título grande y minimalista */
.display-about {
    font-weight: 300;
    font-size: 4rem; /* Tamaño grande como en la imagen */
    color: #000;
    margin-bottom: 2rem;
    letter-spacing: -2px;
}

/* Párrafos de texto de la biografía */
.about-text p {
    font-weight: 300;
    font-size: 1rem;
    line-height: 1.6;
    color: #333;
    margin-bottom: 1.5rem; /* Espaciado entre párrafos */
    max-width: 680px; /* Evita líneas demasiado largas para mejor lectura */
}

/* Ajuste de la imagen lateral para que cubra bien el espacio */
.about-image img {
    width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
}

/* Media query para pantallas pequeñas (móvil/tablet) */
@media (max-width: 991px) {
    .display-about { font-size: 3rem; }
    
    /* En móvil, la imagen va arriba del texto */
    .about-row { flex-direction: column-reverse; }
    .about-image { margin-bottom: 3rem; }
}

/* Pantallas grandes (PC) */
@media (min-width: 992px) {
    .about-image {
        padding-left: 2rem;
    }
}

/* Pantallas pequeñas (Móvil) */
@media (max-width: 991px) {
    .display-about {
        font-size: 3rem; /* Título un poco más pequeño para móvil */
        margin-bottom: 1.5rem;
    }
    
    .about-text {
        margin-bottom: 2rem; /* Espacio antes de que empiece la imagen */
    }

    .about-image img {
        width: 100%;
        /* Opcional: puedes limitar la altura en móvil si es muy larga */
        max-height: 400px;
        object-fit: cover;
    }
}

/* ... (Mantén el resto del CSS anterior igual) ... */

/* PÁGINA CONTACTO */
.contact-upper {
    background-color: #fff; /* Franja superior blanca */
}

/* MAPA EN BLANCO Y NEGRO PURO */
.map-container {
    position: relative;
    overflow: hidden;
    padding-top: 56.25%; /* Relación de aspecto 16:9 */
    border: 1px solid #eee; /* Un borde muy sutil */
}

.map-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    min-height: 600px;
    border: 0;
    /* FILTROS CSS PARA BLANCO Y NEGRO PURO (Saturación 0) */
    filter: grayscale(100%);
    -webkit-filter: grayscale(100%);
}

/* FORMULARIO MINIMALISTA (Ajustes de espaciado) */
.display-contact {
    font-size: 3.5rem;
    font-weight: 300;
    letter-spacing: -1px;
}

/* INDEX: FULL WIDTH SLIDER */

/* Ajuste para que el carrusel ocupe casi toda la pantalla menos el navbar */
.vh-100-custom {
    height: calc(100vh - 80px); /* Ajusta 80px según el alto de tu navbar */
    object-fit: cover; /* Clave para que la imagen no se estire */
}

.carousel-item {
    position: relative;
}

/* Capa sutil para que los textos blancos se lean mejor sobre fotos claras */
.overlay-slider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.15); 
    z-index: 1;
}

.carousel-caption {
    z-index: 2;
    bottom: 45%; /* Centrado vertical aproximado */
}

.carousel-caption h2 {
    letter-spacing: 5px;
    font-weight: 300;
    text-shadow: 1px 1px 10px rgba(0,0,0,0.3);
}

/* Indicadores circulares minimalistas */
.carousel-indicators [button] {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin: 0 5px;
}
/* --- Estilos Generales --- */
.navbar-toggler {
	border:none;
	padding:0;
}

.nav-link {
    transition: color 0.3s ease;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

.nav-link.active {
    font-weight: 700;
    color: #000 !important;
}

/* Asegura que el menú siempre esté por encima de cualquier otro elemento */
.navbar {
    position: relative;
    z-index: 9999 !important;
	position: -webkit-sticky; /* Soporte para Safari */
    position: sticky;
    top: 0;
    z-index: 1020; /* Asegura que quede por encima de las imágenes del slider */
    background-color: rgba(255, 255, 255, 0.95) !important; /* Blanco con ligera transparencia */
    transition: all 0.3s ease;
}

/* Fuerza a que el menú desplegable tenga visibilidad cuando se activa */
.navbar-collapse.show {
    display: block !important;
    background-color: #fff; /* Asegura que el fondo no sea transparente */
    padding: 1rem;
    border-top: 1px solid #eee;
}

/* Evita que el slider oculte el menú */
#homeSlider {
    z-index: 1;
}

/* --- Animación para Móvil (debajo de 768px) --- */
@media (max-width: 767px) {
    .navbar-collapse {
        position: fixed;
        top: 60px; /* Ajusta según la altura de tu header */
        right: -100%; /* Escondido a la derecha */
        width: 100%;
        height: 240vh;
        background-color: rgba(255, 255, 255, 0.98);
        transition: all 0.5s cubic-bezier(0.77, 0.2, 0.05, 1.0);
        display: block !important; /* Necesario para la animación */
        opacity: 0;
    }

    /* Clase que Bootstrap añade automáticamente al abrir */
    .navbar-collapse.show {
        right: 0;
        opacity: 1;
    }

    .navbar-nav {
        padding-top: 2rem;
        display: flex;
        flex-direction: column;
        align-items: center; /* Alinea los enlaces al centro */
    }

    .nav-link {
        font-size: 1.5rem;
        padding: 1.5rem 0 !important;
        width: 100%;
        opacity: 0;
        transform: translateY(20px);
        transition: all 0.4s ease;
    }

    /* Animación escalonada (Staggered) para los enlaces */
    .navbar-collapse.show .nav-link {
        opacity: 1;
        transform: translateY(0);
    }

    .navbar-collapse.show .nav-link:nth-child(1) { transition-delay: 0.2s; }
    .navbar-collapse.show .nav-link:nth-child(2) { transition-delay: 0.3s; }
    .navbar-collapse.show .nav-link:nth-child(3) { transition-delay: 0.4s; }
}