* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;

}

body {
    font-family: 'Inter', sans-serif;
    background-color: #ffffff;
    color: #000;
    overflow-x: hidden;
}

/* =========================
   HEADER
========================= */
.header {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(0,0,0,0.95);
    backdrop-filter: blur(6px);
    border-bottom: 2px solid #dc2626;
    z-index: 1000;
    padding: 10px 0;
}

.swipe-hint{
    text-align: center;
}

.header-container {
    max-width: 1400px;
    margin: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 40px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: white;
}

.brand img {
    height: 40px;
}

.nav-desktop a {
    color: white;
    text-decoration: none;
    margin-left: 25px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* =========================
   MENU HAMBURGUESA
========================= */

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.menu-toggle span {
    width: 25px;
    height: 2px;
    background: white;
    display: block;
    transition: transform 0.3s, opacity 0.3s;
    transform-origin: center;
}
/* =========================
   DRAWER MÓVIL
========================= */

.nav-drawer {
    position: fixed;
    top: 0;
    right: -100%;
    width: 70%;
    max-width: 260px;
    height: 100%;
    background: #0d0d0d;
    border-left: 2px solid #dc2626;
    z-index: 1200;
    display: flex;
    flex-direction: column;
    padding: 80px 24px 40px;
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-drawer.open { right: 0; }

.nav-drawer a {
    color: #888;
    text-decoration: none;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 2px;
    padding: 16px 0;
    border-bottom: 1px solid #1a1a1a;
    transition: color 0.2s, padding-left 0.2s;
    display: block;
    text-align: left;
}

.nav-drawer a:last-child { border-bottom: none; }
.nav-drawer a:hover { color: #fff; padding-left: 8px; }

.nav-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 1100;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.nav-backdrop.open { opacity: 1; pointer-events: all; }

.menu-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.menu-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }



/* =========================
   RESPONSIVE HEADER
========================= */

@media (max-width: 900px) {

    .header-container {
        padding: 0 20px;
    }

    .nav-desktop {
        position: absolute;
        top: 70px;
        left: 0;
        width: 100%;
        background: #000;
        flex-direction: column;
        align-items: center;
        padding: 30px 0;
        gap: 20px;
        display: none;
    }

    .nav-desktop a {
        margin: 0;
        font-size: 14px;
    }

    .nav-desktop.active {
        display: flex;
    }

    .menu-toggle {
        display: flex;
    }

    /* Ajuste del filtro */
    .project-filter {
        gap: 20px;
        font-size: 10px;
        flex-wrap: wrap;
        padding: 20px;
    }

}

   /*FILTRO DE CATEGORÍAS*/

.project-filter {
    position: relative ;
    top: 70px;
    background: #fff;
    z-index: 900;
    padding: 30px 0;
    display: flex;
    justify-content: center;
    gap: 60px;
    border-bottom: 1px solid #eee;
}

.filter-btn {
    background: none;
    border: none;
    font-family: 'Inter', sans-serif;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 2px;
    cursor: pointer;
    color: #888;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    color: #000;
}

.filter-btn.active {
    color: #dc2626;
    font-weight: 600;
}

/* =========================
   GALERÍA
========================= */
.big-gallery {
   padding-top: 10px;
    width: 100%;
}

/* =========================
   PROYECTO
========================= */
.project-item {
    border-bottom: 1px solid #eee;
    width: 100%;
    cursor: pointer;
    transition: transform 0.6s ease, opacity 0.6s ease, background 0.4s ease;
    transform: scale(0.96);
    opacity: 0.5;
}


.project-item.in-view {
    transform: scale(1);
    opacity: 1;
}

.project-item.active {
    background: #fafafa;
}

/* =========================
   HEADER DEL PROYECTO
========================= */
.project-header {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 60px 30px 60px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.p-name {
    font-size: 30px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: -1px;
    transition: color 0.4s ease;
}

.project-item.active .p-name {
    color: #dc2626;
}

.project-meta {
    display: flex;
    gap: 20px;
    font-size: 12px;
    color: #666;
    letter-spacing: 2px;
    text-transform: uppercase;
}


.project-content-wrapper {
    width: 100%;
    padding-bottom: 60px;
    display: flex;
    justify-content: center;
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.project-item.active .project-content-wrapper {
    max-height: 1400px;
    padding-left: 8%;
    padding-bottom: 100px;
}

/* =========================
   SWIPER
========================= */
.swiper {
    width: 100%;
    overflow: visible !important;
}

.swiper-slide {
    width: 850px;
    transition: all 0.7s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    align-items: center;
}

/* =========================
   IMÁGENES
========================= */
.slide-img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    filter: grayscale(100%);
    transition: transform 0.6s ease, filter 0.6s ease;
}




.project-item.active .slide-img {
    filter: grayscale(0%);
}


.project-item:not(.active) .info-slide,
.project-item:not(.active) .extra-slide {
    width: 0 !important;
    opacity: 0;
    overflow: hidden;
}


.project-item:not(.active) .swiper-wrapper {
    margin-left: 10%;
    justify-content: center !important;
    transform: none !important;
}
.project-item.active .info-slide {
    width: 450px !important;
    opacity: 1;
}

.project-item.active .project-content-wrapper {
    justify-content: flex-start;
    padding-left: 8%;
}

.project-item.active .extra-slide {
    width: 900px !important;
    opacity: 1;
}

.info-inner {
    min-width: 400px;
    padding-right: 60px;
}

.info-inner h4 {
    font-size: 11px;
    color: #dc2626;
    letter-spacing: 3px;
    margin-bottom: 15px;
}

.info-inner p {
    font-size: 14px;
    line-height: 1.9;
    color: #333;
}

.project-item.out-view {
    transform: scale(0.92);
    opacity: 0.35;
}

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 1024px) {

    .project-header {
        padding: 40px 30px 20px 30px;
    }

    .p-name {
        font-size: 30px;
    }

    .swiper-slide {
        width: 600px;
    }

    .project-item.active .extra-slide {
        width: 600px !important;
    }

}

@media (max-width: 768px) {


    .project-filter {
        position: sticky;
        top: 62px;
        gap: 0;
        overflow-x: auto;
        scrollbar-width: none;
        -ms-overflow-style: none;
        justify-content: flex-start;
        flex-wrap: nowrap;
        background: #fff;
        z-index: 900;
        border-bottom: 1px solid #e8e8e8;
    }
    .project-filter::-webkit-scrollbar { display: none; }

    .filter-btn {
        flex-shrink: 0;
        padding: 13px 16px;
        font-size: 9px;
        letter-spacing: 1.5px;
        border-bottom: 2px solid transparent;
    }
    .filter-btn.active {
        border-bottom-color: #dc2626;
        color: #dc2626;
    }

    .project-item,
    .project-item.in-view,
    .project-item.out-view {
        transform: none !important;
        opacity: 1 !important;
        transition: background 0.3s !important;
    }

    .project-header {
        padding: 50px 16px 14px;
        gap: 5px;
    }

    .p-name {
        font-size: 18px;
        letter-spacing: 0;
    }


    .swiper {
        overflow: hidden !important;
    }

    .swiper-wrapper {
        display: flex !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        scroll-snap-type: x mandatory !important;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
        transform: none !important;
        margin-left: 0 !important;
        padding: 0 0 16px 16px;
        gap: 10px;
        scroll-padding-right: 16px;
    }
    .swiper-wrapper::-webkit-scrollbar { display: none; }


    .swiper-slide {
        flex-shrink: 0 !important;
        width: 80vw !important;
        scroll-snap-align: start;
        display: flex !important;
        align-items: stretch;
        opacity: 1 !important;
        overflow: visible !important;
    }


    .project-item:not(.active) .info-slide,
    .project-item:not(.active) .extra-slide {
        width: 80vw !important;
        opacity: 1 !important;
        overflow: visible !important;
    }

    .project-item.active .info-slide,
    .project-item.active .extra-slide {
        width: 80vw !important;
        opacity: 1 !important;
    }


    .slide-img {
        filter: none !important;
        border-radius: 8px;
        aspect-ratio: 16 / 9;
        object-fit: cover;
        width: 100%;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    }


    .swiper-slide:last-child .slide-img {
        aspect-ratio: 4 / 3;
        object-fit: contain;
        background: #f5f5f5;
        padding: 8px;
    }


    .swiper-slide:last-child {
        margin-right: 16px;
    }


    .info-inner {
        min-width: 0;
        padding-right: 0;
    }

    .info-inner h4 {
        font-size: 9px;
        letter-spacing: 2px;
    }

    .info-inner p {
        font-size: 12px;
        line-height: 1.6;
        color: #555;
    }


    .p-name { color: #111; }
    .project-item.active .p-name { color: #dc2626; }

}

.info-inner h4 {
  text-transform: uppercase;
}

@media (max-width: 768px) {

    .project-item .swiper-slide,
    .project-item .info-slide,
    .project-item .main-slide,
    .project-item .extra-slide,
    .project-item:not(.active) .info-slide,
    .project-item:not(.active) .extra-slide,
    .project-item.active .info-slide,
    .project-item.active .extra-slide {
        width: 80vw !important;
        min-width: 80vw !important;
        max-width: 80vw !important;
        opacity: 1 !important;
        overflow: visible !important;
        display: flex !important;
        flex-shrink: 0 !important;
    }

    /* Wrapper nunca oculto ni centrado forzado */
    .project-item:not(.active) .swiper-wrapper,
    .project-item .swiper-wrapper {
        margin-left: 0 !important;
        justify-content: flex-start !important;
    }

    /* info-slide siempre al final */
    .info-slide  { order: 99 !important; }
    .main-slide,
    .extra-slide { order: 1  !important; }



}

