@import url("./ax-colors.css");

:root {
    
    
    
    
    
}

/* =========================================================
   BASE DEL MÓDULO
   ========================================================= */

.ax-project-sectors,
.ax-project-filters,
.ax-project-grid-module,
.ax-project-sectors *,
.ax-project-filters *,
.ax-project-grid-module * {
    box-sizing: border-box;
}

.ax-project-sectors-title {
    margin: 0 0 28px;
    color: var(--ax-color-text-dark);
    font-size: clamp(42px, 4vw, 64px);
    font-weight: 700;
    line-height: 0.95;
    letter-spacing: -0.055em;
}

nav.ax-project-sectors {
    margin-top: 30px;
}

/* =========================================================
   MENÚ DE SECTORES
   ========================================================= */

.ax-project-sector-list,
#top .ax-project-sector-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}

.ax-project-sector-item,
#top .ax-project-sector-item {
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}

.ax-project-sector-item::before,
.ax-project-sector-item::after,
#top .ax-project-sector-item::before,
#top .ax-project-sector-item::after {
    display: none !important;
    content: none !important;
}

.ax-project-sector-button,
#top .ax-project-sector-button {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 24px;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0;
    background: transparent !important;
    box-shadow: none !important;
    color: color-mix(in srgb, var(--ax-white) 15%, var(--ax-black));
    font: inherit;
    font-weight: 400;
    line-height: 1.35;
    text-align: left;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
}

.ax-project-sector-button:hover,
.ax-project-sector-button:focus,
.ax-project-sector-button:focus-visible,
#top .ax-project-sector-button:hover,
#top .ax-project-sector-button:focus {
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    outline: none;
}

.ax-project-sector-marker,
#top .ax-project-sector-marker {
    display: block !important;
    flex: 0 0 8px;
    width: 8px !important;
    height: 10px !important;
    margin: 0 12px 0 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: var(--ax-black) !important;
    opacity: 0;
    clip-path: polygon(0 0, 100% 50%, 0 100%);
    -webkit-clip-path: polygon(0 0, 100% 50%, 0 100%);
    transform: translateX(-3px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.ax-project-sector-label {
    display: block;
    min-width: 0;
    font-size: 16px;
    transition: color 0.2s ease, background-color 0.2s ease;
}

.ax-project-sector-count {
    flex: 0 0 auto;
    margin-left: auto;
    padding-left: 12px;
    color: var(--ax-color-text-muted);
    font-size: 11px;
    opacity: 0.55;
    visibility: hidden;
}

.ax-project-sector-button.is-active,
#top .ax-project-sector-button.is-active {
    color: color-mix(in srgb, var(--ax-white) 15%, var(--ax-black)) !important;
    font-weight: 600;
}

.ax-project-sector-button.is-active .ax-project-sector-marker,
#top .ax-project-sector-button.is-active .ax-project-sector-marker {
    opacity: 1 !important;
    transform: translateX(0);
}

.ax-project-sector-button.is-active .ax-project-sector-label,
#top .ax-project-sector-button.is-active .ax-project-sector-label {
    padding: 1px 3px;
    background: var(--ax-yellow) !important;
    color: var(--ax-black) !important;
}

.ax-project-sectors-mobile-toggle,
#top .ax-project-sectors-mobile-toggle {
    display: none !important;
}

/* =========================================================
   CABECERA Y FILTROS
   ========================================================= */

.ax-project-filters {
    position: relative;
    z-index: 4;
    margin-bottom: 28px;
}

.ax-project-filters-header {
    display: flex;
    min-height: 35px;
    align-items: center;
    justify-content: space-between;
}

.ax-project-results-summary {
    margin: 0;
    color: var(--ax-color-text-muted);
    font-size: 12px;
    visibility: hidden;
}

.ax-project-filter-toggle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 7px 0 10px 20px;
    border: 0;
    background: transparent;
    color: var(--ax-color-text-dark);
    font: inherit;
    font-size: 16px;
    line-height: 1;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}

.ax-project-filter-toggle-icon {
    font-size: 18px;
    font-weight: 300;
    line-height: 1;
    transition: transform 0.3s ease;
}

.ax-project-filters.is-open .ax-project-filter-toggle-icon {
    transform: rotate(45deg);
}

.ax-project-filter-form {
    display: grid;
    grid-template-columns: minmax(180px, 1.5fr) repeat(3, minmax(130px, 1fr));
    gap: 16px;
    padding: 22px;
    border-bottom: 1px solid color-mix(in srgb, var(--ax-black) 50%, transparent);
    background: color-mix(in srgb, var(--ax-white) 80%, var(--ax-black));
}

.ax-project-filter-form[hidden] {
    display: none;
}

.ax-project-filter-field label {
    display: block;
    margin: 0;
}

.ax-project-filter-field label > span {
    display: block;
    margin-bottom: 7px;
    color: var(--ax-color-text-dark);
    font-size: 11px;
    font-weight: 700;
    line-height: 1.2;
    text-transform: uppercase;
}

.ax-project-filter-field input,
.ax-project-filter-field select {
    width: 100%;
    height: 44px;
    margin: 0;
    padding: 0 13px;
    border: 1px solid color-mix(in srgb, var(--ax-black) 25%, transparent);
    border-radius: 0;
    background: var(--ax-color-bg-light);
    box-shadow: none;
    color: var(--ax-color-text-dark);
    font: inherit;
    font-size: 14px;
}

.ax-project-filter-field input:focus,
.ax-project-filter-field select:focus {
    border-color: var(--ax-color-text-dark);
    outline: 1px solid var(--ax-color-text-dark);
}

.ax-project-filter-actions {
    display: flex;
    grid-column: 1 / -1;
    align-items: center;
    justify-content: flex-end;
    gap: 18px;
    padding-top: 4px;
}

.ax-project-filter-submit,
.ax-projects-empty-button,
.ax-project-load-more {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    padding: 10px 24px;
    border: 1px solid var(--ax-color-text-dark);
    border-radius: 999px;
    background: var(--ax-color-text-dark);
    color: var(--ax-white) !important;
    font: inherit;
    font-size: 13px;
    line-height: 1;
    text-decoration: none !important;
    cursor: pointer;
    transition: color 0.25s ease, background-color 0.25s ease, transform 0.25s ease;
}

.ax-project-filter-submit:hover,
.ax-projects-empty-button:hover,
.ax-project-load-more:hover {
    background: var(--ax-yellow);
    color: var(--ax-color-text-dark) !important;
    transform: translateY(-2px);
}

.ax-project-filter-reset {
    padding: 8px 0;
    border: 0;
    background: transparent;
    color: var(--ax-color-text-dark);
    font: inherit;
    font-size: 13px;
    text-decoration: underline;
    text-underline-offset: 4px;
    cursor: pointer;
}

/* =========================================================
   GRID DE PROYECTOS
   ========================================================= */

.ax-project-grid-module {
    position: relative;
}

.ax-project-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 54px 42px;
    transition: opacity 0.25s ease;
}

.ax-project-grid-module.is-loading .ax-project-grid {
    opacity: 0.32;
    pointer-events: none;
}

.ax-project-grid-status {
    position: absolute;
    top: 25px;
    left: 50%;
    z-index: 5;
    color: var(--ax-color-text-dark);
    font-size: 13px;
    white-space: nowrap;
    transform: translateX(-50%);
}

.ax-project-card {
    min-width: 0;
    margin: 0;
}

.ax-project-card-link {
    display: block;
    color: var(--ax-color-text-dark) !important;
    text-decoration: none !important;
}

.ax-project-card-media {
    position: relative;
    aspect-ratio: 1.48 / 1;
    overflow: hidden;
    background: color-mix(in srgb, var(--ax-white) 80%, var(--ax-black));
}

.ax-project-card-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.65s cubic-bezier(0.2, 0.75, 0.25, 1);
}

.ax-project-card-placeholder {
    display: flex;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, color-mix(in srgb, var(--ax-black) 4%, transparent), color-mix(in srgb, var(--ax-black) 14%, transparent));
    color: color-mix(in srgb, var(--ax-black) 45%, transparent);
    font-size: 18px;
    letter-spacing: 0.25em;
    text-transform: uppercase;
}

.ax-project-card-link:hover .ax-project-card-image {
    transform: scale(1.035);
}

.ax-project-card-arrow {
    position: absolute;
    top: 16px;
    right: 16px;
    display: flex;
    width: 38px;
    height: 38px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--ax-yellow);
    color: var(--ax-color-text-dark);
    font-size: 18px;
    opacity: 0;
    transform: translateY(7px);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.ax-project-card-link:hover .ax-project-card-arrow {
    opacity: 1;
    transform: translateY(0);
}

.ax-project-card-status {
    position: absolute;
    bottom: 14px;
    left: 14px;
    padding: 7px 12px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--ax-black) 86%, transparent);
    color: var(--ax-white);
    font-size: 13px;
    line-height: 1;
}




/* =========================================================
   METADATOS DE LA TARJETA: SECTOR + AÑO
   ========================================================= */

.ax-project-card-information {
    margin-top: 30px;
    padding-top: 16px;
    border-top: 2px solid var(--ax-black) !important;
}

.ax-project-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    width: 100%;
    margin-bottom: 4px;
}

.ax-project-card-sector,
.ax-project-card-year {
    display: block;
    margin: 0;
    color: var(--ax-black);
    font-size: 18px;
    font-weight: 400;
    line-height: 1.2;
}

.ax-project-card-sector {
    min-width: 0;
}

.ax-project-card-year {
    flex: 0 0 auto;
    margin-left: auto;
    text-align: right;
}

.ax-project-card-title {
    margin: 0 !important;
    color: var(--ax-black);
    font-size: clamp(24px, 2vw, 32px);
    font-weight: 500;
    line-height: 1.05;
    text-transform: uppercase !important;
}


.ax-project-load-more-wrapper {
    display: flex;
    justify-content: center;
    padding-top: 55px;
}

/* =========================================================
   ESTADO VACÍO
   ========================================================= */

.ax-projects-empty {
    display: flex;
    grid-column: 1 / -1;
    min-height: 300px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 45px;
    background: color-mix(in srgb, var(--ax-white) 80%, var(--ax-black));
    text-align: center;
}

.ax-projects-empty-text {
    max-width: 410px;
    margin: 0 0 22px;
    color: var(--ax-color-text-dark);
    font-size: 16px;
    line-height: 1.5;
}

/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 1100px) {
    .ax-project-filter-form {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* =========================================================
   MÓVIL
   ========================================================= */

@media (max-width: 767px) {
    .ax-project-sectors,
    #top .ax-project-sectors {
        position: relative;
        width: 100%;
        margin-bottom: 30px;
    }

    .ax-project-sectors-title {
        margin-bottom: 20px;
    }

    .ax-project-sectors-mobile-toggle,
    #top .ax-project-sectors-mobile-toggle {
        display: flex !important;
        width: 100%;
        min-height: 48px;
        align-items: center;
        justify-content: space-between;
        margin: 0 !important;
        padding: 12px 14px !important;
        border: 1px solid var(--ax-color-text-muted) !important;
        border-radius: 0;
        background: transparent !important;
        box-shadow: none !important;
        color: color-mix(in srgb, var(--ax-white) 15%, var(--ax-black)) !important;
        font: inherit;
        font-size: 16px;
        font-weight: 400;
        line-height: 1.2;
        text-align: left;
        cursor: pointer;
        appearance: none;
        -webkit-appearance: none;
    }

    .ax-project-sectors-mobile-toggle:hover,
    .ax-project-sectors-mobile-toggle:focus,
    #top .ax-project-sectors-mobile-toggle:hover,
    #top .ax-project-sectors-mobile-toggle:focus {
        border-color: color-mix(in srgb, var(--ax-white) 15%, var(--ax-black)) !important;
        background: transparent !important;
        color: color-mix(in srgb, var(--ax-white) 15%, var(--ax-black)) !important;
        outline: none;
    }

    .ax-project-sectors-mobile-icon {
        display: block;
        flex: 0 0 auto;
        margin-left: 15px;
        font-size: 18px;
        font-weight: 400;
        line-height: 1;
    }

    .ax-project-sector-list,
    #top .ax-project-sector-list {
        display: none !important;
        flex-direction: column;
        gap: 0;
        width: 100%;
        margin: 0 !important;
        padding: 0 !important;
        border: 1px solid color-mix(in srgb, var(--ax-white) 80%, var(--ax-black));
        border-top: 0;
        background: var(--ax-color-bg-light);
        list-style: none !important;
    }

    .ax-project-sectors.is-mobile-open .ax-project-sector-list,
    #top .ax-project-sectors.is-mobile-open .ax-project-sector-list {
        display: flex !important;
    }

    .ax-project-sectors.is-mobile-open .ax-project-sectors-mobile-icon {
        font-size: 0;
    }

    .ax-project-sectors.is-mobile-open .ax-project-sectors-mobile-icon::after {
        content: "−";
        font-size: 18px;
        line-height: 1;
    }

    .ax-project-sector-item,
    #top .ax-project-sector-item {
        display: block;
        width: 100%;
        margin: 0 !important;
        padding: 0 !important;
        border: 0 !important;
    }

    .ax-project-sector-button,
    #top .ax-project-sector-button {
        display: flex !important;
        width: 100%;
        min-height: 42px;
        align-items: center;
        margin: 0 !important;
        padding: 10px 14px !important;
        border: 0 !important;
        background: transparent !important;
        box-shadow: none !important;
        color: color-mix(in srgb, var(--ax-white) 15%, var(--ax-black)) !important;
        font: inherit;
        font-size: 16px;
        font-weight: 400;
        line-height: 1.3;
        text-align: left;
    }

    .ax-project-sector-button:hover,
    .ax-project-sector-button:focus,
    #top .ax-project-sector-button:hover,
    #top .ax-project-sector-button:focus {
        background: color-mix(in srgb, var(--ax-white) 35%, transparent) !important;
        outline: none;
    }

    .ax-project-sector-button.is-active,
    #top .ax-project-sector-button.is-active {
        font-weight: 600;
    }

    .ax-project-filter-form {
        grid-template-columns: 1fr;
        padding: 18px 14px;
    }

    .ax-project-filter-actions {
        grid-column: auto;
        justify-content: space-between;
    }

    .ax-project-grid {
        grid-template-columns: 1fr;
        gap: 42px;
    }

    .ax-project-card-media {
        aspect-ratio: 1.35 / 1;
    }

    .ax-project-card-title {
        font-size: 25px;
    }

    .ax-project-card-arrow {
        opacity: 1;
        transform: none;
    }

    .ax-projects-empty {
        min-height: 260px;
        padding: 35px 22px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ax-project-card-image,
    .ax-project-card-arrow,
    .ax-project-filter-submit,
    .ax-projects-empty-button,
    .ax-project-load-more,
    .ax-project-sector-marker,
    .ax-project-sector-label {
        transition: none;
    }
}
