
/* ===========================================
   PRELOADER CON LOGO GIRANDO
   =========================================== */
.projects-preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.projects-preloader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.projects-preloader-content {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.projects-preloader-logo {
  width: 120px;
  height: 120px;
  animation: spin 2s linear infinite;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* Ocultar scroll mientras el preloader está activo */
body.projects-preloader-active {
  overflow: hidden;
}

/* Responsive para el preloader */
@media (max-width: 768px) {
  .projects-preloader-logo {
    width: 80px;
    height: 80px;
  }
}

h1, h2, h3, h4, h5, h6 { font-family: "Space Grotesk", sans-serif !important; }
body, p, span, div, a, li, td, th, label, input, textarea, select, button { font-family: "Inter", sans-serif !important; }


.container {
    width: 100%;
    max-width: 120rem;
    /* margin: auto; */
    padding: 0rem 1.5rem;
}

.gallery {
    display: grid;
    grid-gap: 1rem;
    grid-template-columns: auto auto auto auto;
    grid-auto-flow: dense;
    padding: 2rem 2rem 4rem 2rem;
}

.gallery img {
    position: relative;
    width: 100%;
    height: 100%;
    object-fit: cover;
    overflow: hidden;
}

.gallery-item:first-child {
    grid-column-start: span 2;
}

.gallery-item:nth-child(2) {
    grid-column-start: span 2;
}

.gallery-item:nth-child(12) {
    grid-column-start: span 2;
}

.gallery-item:nth-child(4) {
    grid-column-start: span 2;
}

.gallery-item:nth-child(5) {
    grid-column-start: span 2;
}

.gallery-item:nth-child(14) {
    grid-column-start: span 4;
}

.gallery-item:nth-child(16) {
    grid-column-start: span 2;
}

.gallery-item:nth-child(17) {
    grid-column-start: span 2;
}

.gallery-item:nth-child(18) {
    grid-column-start: span 1;
}

.gallery-item:nth-child(19) {
    grid-column-start: span 2;
}

.gallery-item:nth-child(20) {
    grid-column-start: span 1;
}

/* Clases para tamaños especiales */
.gallery-item.tall {
    grid-row-start: span 2;
}

.gallery-item.wide {
    grid-column-start: span 2;
}

.gallery-item.tall.wide {
    grid-column-start: span 2;
    grid-row-start: span 2;
}

/* Forzar proporciones normales para La Querencia */
.gallery-item.normal-size {
    grid-column-start: span 1 !important;
    grid-row-start: span 1 !important;
}

.gallery-item.normal-size img {
    object-fit: cover !important;
    height: 300px !important;
    width: 100% !important;
}

/* Últimos 3 items con la misma altura */
.gallery-item.same-size {
    grid-column-start: span 1 !important;
    grid-row-start: span 1 !important;
}

.gallery-item.same-size img {
    object-fit: cover !important;
    height: 300px !important;
    width: 100% !important;
}

/* Item del medio con wide pero misma altura */
.gallery-item.same-size.wide {
    grid-column-start: span 2 !important;
    grid-row-start: span 1 !important;
}

.gallery-item.same-size.wide img {
    object-fit: cover !important;
    height: 300px !important;
    width: 100% !important;
}



/* ===========================================
   SOMBRA DE DIFUMINACIÓN INFERIOR
   =========================================== */
.bottom-shadow {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100vw;
    height: 150px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.5) 40%, rgba(0, 0, 0, 0.2) 70%, transparent 100%);
    z-index: 999;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.bottom-shadow.hidden {
    opacity: 0;
}

/* ===========================================
   FILTER BUTTONS - FLOATING BOTTOM
   =========================================== */
.projects-filter {
    position: fixed;
    bottom: 0px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    padding: 15px 25px;
    border-radius: 50px;
    margin-bottom: 0;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.projects-filter.visible {
    opacity: 1;
    visibility: visible;
}

.filter-btn {
    background: #f8f9fa;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    color: #6c757d;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0 5px;
}

.filter-btn:hover {
    background: #dcff81;
    color: #222;
    transform: translateY(-2px);
}

.filter-btn.active {
    background: #dcff81;
    color: #222;
}

/* ===========================================
   PROJECT OVERLAY (HOVER EFFECTS EXACTOS DE PROJECTS-GRID)
   =========================================== */
.img {
    position: relative;
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 30px;
    opacity: 0;
    transition: all 0.3s ease;
}

.gallery-item:hover .project-overlay {
    opacity: 1;
}

/* ===========================================
   PROJECT INFO (Título, Ubicación, Área)
   =========================================== */
.project-info {
    color: white;
}

.project-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
    color: white;
    font-family: "Space Grotesk", sans-serif;
}

.project-location {
    font-size: 16px;
    color: #dcff81;
    margin-bottom: 4px;
    font-weight: 500;
    font-family: "Inter", sans-serif;
}

.project-area {
    font-size: 14px;
    color: #ccc;
    font-weight: 400;
    font-family: "Inter", sans-serif;
}

/* ===========================================
   PROJECT ARROW (Flecha de navegación)
   =========================================== */
.project-arrow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #dcff81;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #222;
    transition: all 0.3s ease;
}

.project-arrow iconify-icon {
    font-size: 28px;
}

/* Link simple sin efectos pesados */
.img a {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
    position: relative;
}

/* ===========================================
   FILTER ANIMATIONS
   =========================================== */
.img.hidden {
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.3s ease;
}

.img.visible {
    opacity: 1;
    transform: scale(1);
    transition: all 0.3s ease;
}

/* ===========================================
   RESPONSIVE DESIGN - MOBILE
   =========================================== */
@media (max-width: 768px) {
    .gallery {
        grid-template-columns: 1fr !important;
        grid-auto-rows: auto !important;
        gap: 1rem !important;
        padding: 1rem !important;
    }
    
    /* Forzar todas las imágenes a una columna en móviles */
    .gallery-item,
    .gallery-item:first-child,
    .gallery-item:nth-child(2),
    .gallery-item:nth-child(4),
    .gallery-item:nth-child(5),
    .gallery-item:nth-child(12),
    .gallery-item:nth-child(14),
    .gallery-item:nth-child(16),
    .gallery-item:nth-child(17),
    .gallery-item:nth-child(18),
    .gallery-item:nth-child(19),
    .gallery-item:nth-child(20),
    .gallery-item.wide,
    .gallery-item.tall,
    .gallery-item.tall.wide,
    .gallery-item.normal-size,
    .gallery-item.same-size,
    .gallery-item.same-size.wide {
        grid-column-start: span 1 !important;
        grid-row-start: span 1 !important;
    }
    
    /* Altura fija para todas las imágenes en móviles */
    .gallery-item img {
        height: 250px !important;
        object-fit: cover !important;
    }
    
    /* Eliminar hover effect en móviles y mostrar siempre la información */
    .gallery-item:hover .project-overlay {
        opacity: 1 !important;
    }
    
    .project-overlay {
        opacity: 1 !important;
        background: rgba(0, 0, 0, 0.6) !important;
        padding: 20px !important;
    }
    
    /* Ajustar tamaño de texto para móviles */
    .project-title {
        font-size: 20px !important;
    }
    
    .project-location {
        font-size: 14px !important;
    }
    
    .project-area {
        font-size: 12px !important;
    }
    
    /* Ocultar flecha en móviles */
    .project-arrow {
        display: none !important;
    }
    
    /* Ajustar filtros para móviles */
    .projects-filter {
        padding: 10px 15px !important;
        bottom: 10px !important;
    }
    
    .filter-btn {
        padding: 8px 16px !important;
        font-size: 10px !important;
        margin: 0 3px !important;
    }
    
    /* Ajustar sombra inferior para móviles */
    .bottom-shadow {
        height: 100px !important;
    }}