/* ========================================
   BASE
======================================== */

.uh-custom-catalog {
    --catalog-surface: #fff;
    --catalog-soft: var(--color-page-background, #f5f6f8);
    --catalog-muted: #59636f;
    --catalog-line: rgba(37, 43, 51, 0.10);
    --catalog-radius: 30px 8px 30px 8px;

    color: var(--color-text);
    background: var(--catalog-surface);
}

.uh-custom-catalog__container {
    width: calc(100% - var(--header-side) - var(--header-side));
    max-width: var(--header-max-width);
    margin-inline: auto;
    padding-inline: 26px;
}

.uh-custom-catalog section[id] {
    scroll-margin-top: calc(var(--header-top) + var(--header-height) + 24px);
}

.uh-custom-catalog-section {
    padding-block: clamp(60px, 6vw, 88px);
    background: var(--catalog-surface);
}

.uh-custom-catalog-section.uh-custom-catalog-section--closing {
    padding-top: 0;
}

.uh-custom-catalog__intro {
    max-width: 800px;
    margin-bottom: 36px;
}

.uh-custom-catalog__eyebrow {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    color: var(--color-primary-dark);
    font-size: 12px;
    font-weight: 750;
    line-height: 1.5;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.uh-custom-catalog__eyebrow::before {
    content: "";
    flex: 0 0 30px;
    height: 3px;
    border-radius: 2px;
    background: var(--color-primary);
}

.uh-custom-catalog__title {
    margin: 0;
    color: var(--color-text);
    font-size: clamp(28px, 3vw, 38px);
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.035em;
}

.uh-custom-catalog__text {
    margin: 20px 0 0;
    color: var(--catalog-muted);
    font-size: 16px;
    line-height: 1.8;
}

.uh-custom-catalog a:focus-visible {
    outline: 3px solid var(--color-primary-dark);
    outline-offset: 5px;
}

/* ========================================
   BOTONES
======================================== */

.uh-custom-catalog__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

.uh-custom-catalog__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: 52px;
    padding: 14px 22px;
    border: 1px solid transparent;
    border-radius: 22px 6px 22px 6px;
    color: white;
    background: var(--color-primary);
    font-size: 14px;
    font-weight: 750;
    line-height: 1.5;
    text-align: center;
    text-decoration: none;
    transition:
        background-color 200ms ease,
        border-color 200ms ease,
        transform 200ms ease;
}

.uh-custom-catalog__button i {
    flex-shrink: 0;
}

.uh-custom-catalog__button--secondary {
    color: var(--color-text) !important;
    border-color: rgba(37, 43, 51, 0.24);
    background: transparent;
}

/* ========================================
   HERO
======================================== */

.uh-custom-catalog-hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    padding-top: calc(
        var(--header-top) + var(--header-height) + 42px
    );
    padding-bottom: 60px;
}

.uh-custom-catalog-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background-image: url("/img/fondo-sistema-hidraulico-cesehsa.webp");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.8;
    pointer-events: none;
}

.uh-custom-catalog__breadcrumb {
    margin-bottom: 30px;
}

.uh-custom-catalog__breadcrumb ol {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    margin: 0;
    padding: 0;
    list-style: none;
    color: var(--catalog-muted);
    font-size: 13px;
    line-height: 1.6;
}

.uh-custom-catalog__breadcrumb li+li::before {
    content: "/";
    margin-right: 12px;
    color: #7d8792;
}

.uh-custom-catalog__breadcrumb a {
    color: inherit;
    text-decoration: none;
}

.uh-custom-catalog__breadcrumb a:hover {
    color: var(--color-primary-dark);
    text-decoration: underline;
}

.uh-custom-catalog__breadcrumb [aria-current="page"] {
    color: var(--color-text);
}

.uh-custom-catalog-hero__grid {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    align-items: center;
    gap: 48px;
}

.uh-custom-catalog-hero__content,
.uh-custom-catalog-hero__visual {
    min-width: 0;
}

.uh-custom-catalog-hero__title {
    margin: 0 0 22px;
    color: var(--color-text);
    font-size: clamp(36px, 4vw, 54px);
    font-weight: 600;
    line-height: 1.12;
    letter-spacing: -0.045em;
}

.uh-custom-catalog-hero__title span {
    display: block;
}

.uh-custom-catalog-hero__description {
    max-width: 620px;
    margin: 0;
    color: var(--catalog-muted);
    font-size: 17px;
    line-height: 1.85;
}

.uh-custom-catalog-hero__visual {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin: 0;
}

.uh-custom-catalog-hero__image {
    display: block;
    width: 100%;
    max-width: 560px;
    height: auto;
    max-height: 390px;
    object-fit: contain;
    object-position: center;
    filter: drop-shadow(0 22px 18px rgba(25, 33, 45, 0.14));
}

.uh-custom-catalog-hero__caption {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--catalog-muted);
    font-size: 13px;
    line-height: 1.6;
    text-align: center;
}

.uh-custom-catalog-hero__caption i {
    color: var(--color-primary-dark);
}

/* ========================================
   CUADRÍCULA DE PROYECTOS
======================================== */

.uh-custom-project-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.uh-custom-project-grid__item {
    min-width: 0;
}

.uh-custom-project-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    border: 1px solid var(--catalog-line);
    border-radius: var(--catalog-radius);
    color: var(--color-text);
    background: var(--catalog-surface);
    text-decoration: none;
    transition:
        border-color 250ms ease,
        box-shadow 250ms ease,
        transform 250ms ease;
}

.uh-custom-project-card__visual {
    position: relative;
    isolation: isolate;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    padding: 24px;
    background: var(--catalog-soft);
}

.uh-custom-project-card__visual::before {
    content: "";
    position: absolute;
    inset: 10%;
    z-index: -1;
    border-radius: 50%;
    background: radial-gradient(ellipse at center,
            rgba(224, 230, 236, 0.7),
            transparent 72%);
}

.uh-custom-project-card__image {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 0;
    object-fit: contain;
    object-position: center;
    filter: drop-shadow(0 12px 10px rgba(25, 33, 45, 0.10));
    transition: transform 500ms cubic-bezier(0.22, 1, 0.36, 1);
}

.uh-custom-project-card__content {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: flex-start;
    padding: 28px;
}

.uh-custom-project-card__category {
    display: block;
    margin-bottom: 12px;
    color: var(--color-primary-dark);
    font-size: 11px;
    font-weight: 750;
    line-height: 1.6;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.uh-custom-project-card__title {
    margin: 0 0 14px;
    color: var(--color-text);
    font-size: 23px;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: -0.025em;
}

.uh-custom-project-card__description {
    margin: 0 0 26px;
    color: var(--catalog-muted);
    font-size: 15px;
    line-height: 1.8;
}

.uh-custom-project-card__link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    width: 100%;
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid var(--catalog-line);
    color: var(--color-primary-dark);
    font-size: 14px;
    font-weight: 750;
}

.uh-custom-project-card__arrow {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 12px 4px 12px 4px;
    background: var(--color-primary-soft);
    transition:
        background-color 250ms ease,
        transform 250ms ease;
}

/* ========================================
   CTA FINAL
======================================== */

.uh-custom-catalog-cta {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 40px;
    padding: clamp(28px, 4vw, 48px);
    border: 1px solid var(--catalog-line);
    border-radius: var(--catalog-radius);
    background: var(--catalog-soft);
}

.uh-custom-catalog-cta__content {
    min-width: 0;
    max-width: 760px;
}

/* ========================================
   INTERACCIONES
======================================== */

@media (hover: hover) {
    .uh-custom-catalog__button:hover {
        color: white;
        background: var(--color-primary-hover);
        transform: translateY(-2px);
    }

    .uh-custom-catalog__button--secondary:hover {
        color: var(--color-text) !important;
        border-color: var(--color-primary);
        background: var(--color-primary-soft);
    }

    .uh-custom-project-card:hover {
        border-color: rgba(var(--color-primary-rgb), 0.48);
        color: var(--color-text);
        box-shadow: 0 16px 38px rgba(25, 33, 45, 0.08);
        transform: translateY(-5px);
    }

    .uh-custom-project-card:hover .uh-custom-project-card__image {
        transform: scale(1.035);
    }

    .uh-custom-project-card:hover .uh-custom-project-card__arrow {
        background: var(--color-primary);
        transform: translateX(3px);
    }
}

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

@media (max-width: 1199.98px) {
    .uh-custom-catalog-hero__grid {
        gap: 30px;
    }

    .uh-custom-project-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .uh-custom-catalog-cta {
        grid-template-columns: minmax(0, 1fr);
        justify-items: start;
        gap: 26px;
    }
}

@media (max-width: 991.98px) {
    .uh-custom-catalog-hero {
        padding-top: calc(var(--header-top) + var(--header-height) + 34px);
        padding-bottom: 48px;
    }

    .uh-custom-catalog-hero__grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 36px;
    }

    .uh-custom-catalog-hero__content {
        max-width: 720px;
    }

    .uh-custom-catalog-hero__image {
        max-width: 520px;
        max-height: 340px;
    }
}

@media (max-width: 767.98px) {
    .uh-custom-project-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 20px;
    }
}

@media (max-width: 575.98px) {
    .uh-custom-catalog__container {
        padding-inline: 14px;
    }

    .uh-custom-catalog-section {
        padding-block: 52px;
    }

    .uh-custom-catalog__intro {
        margin-bottom: 28px;
    }

    .uh-custom-catalog__breadcrumb {
        margin-bottom: 26px;
    }

    .uh-custom-catalog-hero__description {
        font-size: 16px;
        line-height: 1.8;
    }

    .uh-custom-catalog__actions {
        flex-direction: column;
        align-items: stretch;
    }

    .uh-custom-catalog-hero__image {
        max-height: 280px;
    }

    .uh-custom-project-card__visual {
        padding: 22px;
    }

    .uh-custom-project-card__content {
        padding: 24px;
    }

    .uh-custom-project-card__title {
        font-size: 22px;
    }

    .uh-custom-catalog-cta {
        padding: 26px;
        justify-items: stretch;
    }

    .uh-custom-catalog-cta>.uh-custom-catalog__button {
        width: 100%;
    }
}

/* ========================================
   MOVIMIENTO REDUCIDO
======================================== */

@media (prefers-reduced-motion: reduce) {

    .uh-custom-catalog__button,
    .uh-custom-project-card,
    .uh-custom-project-card__image,
    .uh-custom-project-card__arrow {
        transition: none;
    }

    .uh-custom-catalog__button:hover,
    .uh-custom-project-card:hover,
    .uh-custom-project-card:hover .uh-custom-project-card__image,
    .uh-custom-project-card:hover .uh-custom-project-card__arrow {
        transform: none;
    }
}