/* Reset básico */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Raleway", sans-serif;
    background-color: #fff;
    color: #000;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
    width: 100%;
}

/* ================================================ Projects ================================================ */
.projects-stack {
    max-width: 100%;
    margin: 0 auto;
    padding: 64px 123px;
    position: relative;
}

/* Contenedor del título y botones */
.title-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    max-width: 1120px;
    margin: 0 auto 48px;
}

.title {
    width: 100%;
}

.title h3 {
    font-size: 48px;
    line-height: 56px;
    margin-bottom: 16px;
    letter-spacing: -2%;
    font-weight: 600;
}

.title p {
    font-size: 24px;
    line-height: 32px;
}

/* Botones de navegación */
/*.nav-buttons {
    display: flex;
    flex-direction: row;
    gap: 8px;
    position: end;
    bottom: 0;
    justify-content: space-between;
}*/

/*.nav-buttons button {
    width: 48px;
    height: 48px;
    border-radius: 9999px;
    border: 1px solid transparent;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}*/

/*.nav-buttons button:hover {
    background: rgba(0, 0, 0, 0.25);
}*/

/*.nav-buttons button:active {
    background: transparent;
    border: 1px solid transparent;
    color: #000;
}*/

/*.nav-buttons svg {
    stroke: #fff;
}*/

/*.nav-buttons svg:active {
    stroke: #000;
}*/


.projects-stack-2 {
    max-width: 100%;
    margin: 0 auto;
    padding: 64px 123px;
    position: relative;
}

.title-wrapper-2 {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    max-width: 1120px;
    margin: 0 auto 48px;
}

.title-2 {
    width: 100%;
    text-align: left;
}

.title-2 h3 {
    font-size: 48px;
    line-height: 56px;
    margin-bottom: 16px;
    letter-spacing: -2%;
    font-weight: 600;
}

.title-2 p {
    font-size: 24px;
    line-height: 32px;
    text-align: left;
}

.cards-stack-2 {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 24px;
    height: 300vh;
}

.stack-card-2 {
    display: flex;
    flex-direction: row;
    width: 100%;
    max-width: 1120px;
    height: 600px;
    padding: 64px;
    margin: 0 auto;
    gap: 32px;
    border-radius: 16px;
    color: #fff;
    position: sticky;
    top: 100px;
    z-index: 1;
    transition: transform 0.5s ease, box-shadow 0.5s ease;
    transform: scale(1);
    align-items: center;
}

.stack-card-2.shrink {
    transform: scale(0.95);
    box-shadow: 0 0 0 rgba(0, 0, 0, 0);
    z-index: 0;
    background-color: #484848;
}

.project-1-2,
.project-2-2,
.project-3-2 {
    background-color: #000;
}

.stack-card-2 .content-text-2 {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.stack-card-2 .image-2 {
    flex: 1;
    height: 100%;
    display: flex;
}

.stack-card-2 .image-2 img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 24px;
    display: block;
}

.topics-2 {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
}

.topic-2 {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    height: 32px;
    border: 1px solid #fff;
    border-radius: 9999px;
    background: transparent;
    font-size: 16px;
    line-height: 24px;
    font-weight: 400;
    white-space: nowrap;
    text-align: left;
    color: #fff;
    margin-bottom: 0;
}

.card-text-2 h6 {
    font-size: 32px;
    line-height: 40px;
    letter-spacing: -2%;
    font-weight: 600;
    text-align: left;
    margin-bottom: 16px;
    color: #fff;
}

.card-text-2 p {
    font-size: 16px;
    line-height: 24px;
    letter-spacing: 0;
    font-weight: 400;
    text-align: left;
    margin-bottom: 48px;
    color: #fff;
}

.project-link-2 {
    display: inline-block;
    padding: 12px 24px;
    height: 48px;
    font-size: 18px;
    line-height: 24px;
    letter-spacing: 0;
    font-weight: 400;
    text-decoration: none;
    border-radius: 9999px;
    background-color: #fff;
    color: #000;
    cursor: pointer;
    text-align: center;
    transition: all 0.3s ease;
}

.project-link-2:hover {
    background-color: rgba(255, 255, 255, 0.25);
}

.project-link-2:active {
    background-color: transparent;
    color: #fff;
}



/* ================================================ All Projects ================================================ */
.all-projects {
    padding: 64px 123px;
    background-color: #fff;
    text-align: center;
}

.all-projects .container {
    max-width: 1120px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Header */
.header {
    margin-bottom: 48px;
}

.header h3 {
    width: 100%;
    font-size: 48px;
    line-height: 56px;
    letter-spacing: -2%;
    margin-bottom: 16px;
    font-weight: 600;
}

.header p {
    width: 100%;
    font-size: 24px;
    line-height: 32px;
    letter-spacing: -2%;
    margin-bottom: 48px;
}

/* Filters */
.filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 16px;
}

.filter-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 16px;
    height: 40px;

    border: 1px solid #000;
    border-radius: 9999px;
    background: transparent;

    color: #000;
    font-size: 16px;
    line-height: 24px;
    letter-spacing: 0%;

    cursor: pointer;
    transition: all 0.3s ease;
    vertical-align: middle;
}

.filter-btn span.icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
    height: 16px;
}

.filter-btn svg {
    width: 16px;
    height: 16px;
    display: block;
    vertical-align: middle;
}


/* Estado por defecto (no activo) */
.filter-btn .icon.active {
    display: none;
}

/* Hover (no activo): opacidad al 25% */
.filter-btn:hover {
    opacity: 0.25;
}

/* Estado activo */
.filter-btn.active {
    background: #000;
    color: #fff;
    border-color: #000;
}

/* Al estar activo, intercambiamos los íconos */
.filter-btn.active .icon.default {
    display: none;
}

.filter-btn.active .icon.active {
    display: inline-flex;
}

/* Hover activo: opacidad al 25% */
.filter-btn.active:hover {
    opacity: 0.25;
}

/* SVG dentro del botón activo */
.filter-btn.active svg {
    stroke: #fff;
    fill: #fff;
}

/* === DROPDOWN === */
/* Contenedor principal */
.select {
    position: relative;
    width: 100%;
    cursor: pointer;
    transition: 300ms;
    color: white;
    overflow: visible;
}

/* Botón visible */
.selected {
    background-color: #000000;
    padding: 12px 24px;
    height: 48px;
    margin-bottom: 3px;
    border-radius: 9999px;
    position: relative;
    z-index: 10;
    font-size: 16px;
    font-weight: 400;
    line-height: 24px;
    letter-spacing: 0%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    user-select: none;
    width: 100%;
    box-sizing: border-box;
}

/* Flecha */
.arrow {
    width: 24px;
    height: 24px;
    stroke: white;
    transition: transform 0.5s ease;
    flex-shrink: 0;
}

/* Rotar al desplegar */
.select:hover .arrow {
    transform: rotate(180deg);
}

/* Contenedor de opciones */
.options {
    display: flex;
    flex-direction: column;
    border-radius: 16px;
    padding: 16px;
    background-color: #000000;
    position: absolute;
    top: 96px;
    left: 0;
    opacity: 0;
    height: auto;
    max-height: 440px;
    transition: all 0.5s ease;
    overflow-y: auto;
    width: 100%;
    box-sizing: border-box;
    z-index: 999;
}


.select:hover>.options {
    opacity: 1;
    top: 0;
}

.option {
    border-radius: 9999px;
    padding: 8px 16px;
    transition: background-color 0.3s ease;
    background-color: transparent;
    font-size: 16px;
    font-weight: 400;
    line-height: 24px;
    letter-spacing: 0%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    user-select: none;
    width: 100%;
    box-sizing: border-box;
}

.option:hover {
    background-color: rgba(255, 255, 255, 0.25);
}

/* Checkbox oculto */
.option input[type="checkbox"] {
    display: none;
}

/* Contenedor de imagen del check */
.custom-check {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid white;
    border-radius: 4px;
    background-color: transparent;
    position: relative;
}

/* Imagen oculta por defecto */
.custom-check img {
    display: none;
    width: 16px;
    height: 16px;
}

/* Mostrar imagen cuando está seleccionado */
.option input[type="checkbox"]:checked+.custom-check img {
    display: block;
}

.options {
    scrollbar-width: thin;
    scrollbar-color: #555 transparent;
}

.options::-webkit-scrollbar {
    width: 6px;
}

.options::-webkit-scrollbar-thumb {
    background-color: #555;
    border-radius: 3px;
}

.options::-webkit-scrollbar-thumb:hover {
    background-color: #888;
}

/* Mostrar solo móvil o desktop según pantalla */
.mobile-dropdown {
    display: none;
}


/*========= PROJECT GRID CARD ==========*/
.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
    margin-bottom: 48px;
}

.project-card {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    height: 100%;
    width: 100%;    
    padding: 0;
    transition: all 0.4s ease;
    position: relative;
    text-decoration: none;
    color: inherit;
}

.project-card:hover {
    transform: translateY(-8px);
}

.project-card.hidden {
    opacity: 0;
    transform: scale(0.95);
    pointer-events: none;
}

.project-card:hover {
    transform: translateY(-8px);
}

.project-card .view-more {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 16px;
    line-height: 24px;
    font-weight: 600;
    color: #000;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: underline;
    margin-top: auto;
    padding-top: 24px;
}


.project-card .view-more svg {
    stroke: #000;
    transition: all 0.3s ease;
}

.project-card .view-more:hover {
    color: rgba(0, 0, 0, 0.25);
}

.project-card .view-more:hover svg {
    stroke: rgba(0, 0, 0, 0.25);
}


.project-card img {
    width: 100%;
    height: 360px;
    object-fit: cover;
    border-radius: 24px;
    margin-bottom: 24px;
    flex-shrink: 0;   
}

/*========= PROJECT CARD TAGS ==========*/
.projects-tags-wrapper {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.project-card .projects-tag {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 9999px;
    border: 1px solid #000;
    font-size: 16px;
    font-weight: 400;
    line-height: 24px;
    color: #000;
    gap: 4px;

    white-space: nowrap;         
    height: auto;                
    min-height: 32px;
    box-sizing: border-box;
}

.projects-tag svg {
    display: block;
    width: 16px;
    height: 16px;
    stroke: currentColor;
}


/*========= PROJECT CARD INFO ==========*/
.project-card h6 {
    font-size: 24px;
    line-height: 32px;
    font-weight: 600;
    letter-spacing: -2%;
    color: #000;
    margin-bottom: 16px;
}

.project-card .desc {
    font-size: 16px;
    line-height: 24px;
    letter-spacing: 0%;
}

/* Load More */
.load-more-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
}

.load-more {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 9999px;
    font-family: "Raleway", sans-serif;
    font-size: 18px;
    font-weight: 400;
    line-height: 24px;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.3s, color 0.3s, border 0.3s;
    background: #000;
    color: #fff;
    border: 1px solid transparent;
}

.load-more:hover {
    background: rgba(0, 0, 0, 0.25);
    color: #fff;
}

.load-more:active {
    background: transparent;
    color: #000;
    border: 1px solid transparent;
}


/* En dispositivos táctiles, desactivar hover */
@media (hover: none) and (pointer: coarse) {
    .load-more:hover {
        background: #000 !important;
        color: #fff !important;
    }
}


/* --- RESPONSIVE ---*/
/* === Responsive hasta 992px === */
@media screen and (max-width: 992px) {

    .projects-stack-2 {
        padding: 64px 68px;
    }

    /* Cards */
    /* Card principal */
    .stack-card-2 {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        padding: 42px;
        gap: 32px;
        height: auto;
    }

    .stack-card-2 .content-text-2,
    .stack-card-2 .image-2 {
        flex: 1 1 0;
        min-width: 0;
    }

    .stack-card-2 .image-2 img {
        width: 100%;
        height: auto;
        object-fit: cover;
        border-radius: 16px;
        display: block;
    }

    /* Topics: flex wrap para que bajen */
    .topics-2 {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }

    .topic-2 {
        margin-bottom: 0px;
    }

    /* All projects section */
    .all-projects {
        padding: 64px 68px;
    }

    .projects-grid {
        grid-template-columns: 1fr 1fr;
        gap: 32px;
    }

}

/* === Responsive hasta 768px === */
@media screen and (max-width: 768px) {

    /* Sección Projects Stack */
    .projects-stack-2 {
        padding: 48px 36px;
    }

    .title-wrapper-2 {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
    }

    .title-2 {
        width: 100%;
        text-align: center;
    }

    .title-2 p {
        text-align: center !important;
        margin-left: auto;
        margin-right: auto;
    }


    /* Título de la sección Featured Projects */
    .title-2 h3 {
        font-size: 40px;
        line-height: 48px;
        letter-spacing: -2%;
    }

    /* Descripción debajo del título */
    .title-2 p {
        font-size: 20px;
        line-height: 28px;
        letter-spacing: 0;
    }

    /* Cards Stack */
    .cards-stack-2 {
        display: flex;
        flex-direction: column;
        gap: 32px;
        height: auto;
    }

    /* Cada Card */
    .stack-card-2 {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 32px;
        height: auto;
        gap: 32px;
    }

    /* Contenido de texto */
    .stack-card-2 .content-text-2 {
        width: 100%;
    }

    .card-text-2 {
        text-align: center;
        justify-content: center;
        align-items: center;
        display: flex;
        flex-direction: column;
    }

    .card-text-2 h6,
    .card-text-2 p {
        text-align: center;
        margin-left: auto;
        margin-right: auto;
    }

    /* Imagen */
    .stack-card-2 .image-2 {
        width: 100%;
        height: 320px;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .stack-card-2 .image-2 img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        border-radius: 16px;
    }

    .topics-2 {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
    }

    .topic-2 {
        margin-bottom: 0;
    }

    .header p {
        font-size: 24px;
        line-height: 32px;
    }
    .card-text-2 p {
        margin-bottom: 24px;
    }

    /*==== Dropdown ====*/
    .mobile-dropdown {
        display: block;
    }

    .desktop-filters {
        display: none;
    }

    /* Card text */
    .card-text h6 {
        font-size: 32px;
        line-height: 40px;
        text-align: center;
    }

    .card-text p {
        font-size: 16px;
        line-height: 24px;
        text-align: center;
        margin-bottom: 32px;
    }

    /* Padding general de la sección */
    .all-projects {
        padding: 48px 36px;
        text-align: center;
    }

    /* Header */
    .header h3 {
        width: 100%;
        font-size: 36px;
        line-height: 44px;
    }

    .header p {
        width: 100%;
        font-size: 20px;
        line-height: 28px;
    }

    /* Grid de proyectos */
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    /* Cards */
    .project-card {
        width: 100%;
    }

    
    .load-more:hover {
        background: #000 !important;
        color: #fff !important;
        border-color: transparent !important;
    }
}

@media (max-width: 480px) {
    .topics-2 {
        display: none !important;
    }
}


@media (max-width: 380px) {
    .topics-2 {
        display: none !important;
    }
}

/* === Responsive hasta 360px === */
@media screen and (max-width: 360px) {

    /* Sección Projects Stack */
    .projects-stack-2 {
        padding: 48px 14px;
    }

    /* Título de la sección Featured Projects */
    .title-2 h3 {
        font-size: 36px;
        line-height: 44px;
        letter-spacing: -2%;
        text-align: center;
        width: 100%;
    }

    .title-2 p {
        font-size: 20px;
        line-height: 28px;
        letter-spacing: 0%;
        text-align: center;
    }

    /* Cards Stack */
    .cards-stack-2 {
        gap: 24px;
    }

    /* Cada Card */
    .stack-card-2 {
        padding: 13px;
        gap: 24px;
    }

    /* Imagen */
    .stack-card-2 .image-2 {
        height: 320px;
    }

    /* Card text */
    .card-text-2 h6 {
        font-size: 24px;
        line-height: 32px;
        letter-spacing: -2%;
    }

    /* Sección All Projects */
    .all-projects {
        padding: 48px 14px;
    }

    .header h3 {
        font-size: 32px;
        line-height: 40px;
        letter-spacing: -2%;
    }

    .header p {
        font-size: 20px;
        line-height: 28px;
    }

    /* Grid de proyectos */
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    /* Cards */
    .project-card {
        width: 100%;
    }

    .project-card img {
        border-radius: 16px;
        height: auto;
    }

    .card-text-2 p {
        margin-bottom: 24px;
    }

}