/* =============================================================
   tramites.css — Página «Trámites» (catálogo de procedimientos).
   Depende de consorcio.css (hero, wrap, deco). Estilo eAdmin + Apple.
   ============================================================= */

/* Hero sin foto: degradado grafito + acento rojo (heredado de ::after). */
.cpeis-phero--tramites::before {
    background-image: url("imagenes/pma-escudo.jpg");
    background-position: center 40%;
}

/* ---------- Aviso de la Sede ---------- */
/* Especificidad .cpeis-consorcio X para vencer a «.cpeis-consorcio section». */
.cpeis-consorcio .cpeis-tram-notice-wrap { padding-block: clamp(1.5rem, 4vw, 2.5rem) 0; }
/* El catálogo va pegado al aviso (mucho menos aire que una sección normal). */
.cpeis-consorcio .cpeis-tram-catalog { padding-top: clamp(1.25rem, 2.5vw, 2.25rem); }
.cpeis-tram-notice {
    display: flex;
    align-items: center;
    gap: clamp(1rem, 2.5vw, 1.6rem);
    padding: clamp(1.1rem, 2.4vw, 1.6rem);
    border-radius: 18px;
    background: linear-gradient(180deg, #fff, #fafafa);
    border: 1px solid var(--cpeis-linea, #e6e6e8);
    box-shadow: 0 12px 30px rgba(20,20,25,0.06);
    border-left: 4px solid var(--cpeis-acento, #ce1019);
}
.cpeis-tram-notice__ico {
    flex: none;
    display: inline-flex;
    width: 46px;
    height: 46px;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: var(--cpeis-acento, #ce1019);
    background: rgba(206,16,25,0.1);
}
.cpeis-tram-notice__ico svg { width: 26px; height: 26px; }
.cpeis-tram-notice__body {
    flex: 1 1 auto;
    font-size: 0.98rem;
    line-height: 1.5;
    color: var(--cpeis-texto, #34343a);
}
.cpeis-tram-notice__body strong { color: var(--cpeis-tinta, #1b1b1f); }
.cpeis-tram-notice__body a { color: var(--cpeis-acento, #ce1019); font-weight: 600; }
.cpeis-tram-notice__cta {
    flex: none;
    display: inline-flex;
    align-items: center;
    gap: 0.45em;
    white-space: nowrap;
}
.cpeis-tram-notice__cta svg { width: 17px; height: 17px; }
@media (max-width: 760px) {
    .cpeis-tram-notice { flex-direction: column; align-items: flex-start; text-align: left; }
    .cpeis-tram-notice__cta { width: 100%; justify-content: center; }
}

/* ---------- Buscador + filtros ---------- */
.cpeis-tram-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.9rem 1.2rem;
    margin-top: clamp(1.5rem, 3.5vw, 2.4rem);
}
.cpeis-tram-search {
    position: relative;
    display: flex;
    align-items: center;
    flex: 1 1 260px;
    max-width: 380px;
}
.cpeis-tram-search__ico {
    position: absolute;
    left: 14px;
    display: inline-flex;
    color: #8a8a91;
    pointer-events: none;
}
.cpeis-tram-search__ico svg { width: 18px; height: 18px; }
.cpeis-tram-search input {
    width: 100%;
    padding: 0.7rem 0.9rem 0.7rem 2.6rem;
    font-size: 1rem;
    color: var(--cpeis-tinta, #1b1b1f);
    background: #fff;
    border: 1px solid var(--cpeis-linea, #e0e0e3);
    border-radius: 12px;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.cpeis-tram-search input:focus {
    border-color: var(--cpeis-acento, #ce1019);
    box-shadow: 0 0 0 3px rgba(206,16,25,0.14);
}
.cpeis-tram-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.cpeis-tram-chip {
    appearance: none;
    -webkit-appearance: none;
    padding: 0.5rem 0.95rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--cpeis-texto, #45454b);
    background: #f1f1f3;
    border: 1px solid transparent;
    border-radius: 10px;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.cpeis-tram-chip:hover { background: #e7e7ea; }
.cpeis-tram-chip.is-active {
    color: #fff;
    background: var(--cpeis-acento, #ce1019);
    border-color: var(--cpeis-acento, #ce1019);
}

.cpeis-tram-count {
    margin: 1.2rem 0 0;
    font-size: 0.9rem;
    color: #77777e;
}

/* ---------- Rejilla de trámites ---------- */
.cpeis-tram-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: clamp(1rem, 2vw, 1.4rem);
    margin-top: 1rem;
}
.cpeis-tram-card {
    display: flex;
    flex-direction: column;
    padding: clamp(1.2rem, 2.2vw, 1.5rem);
    background: #fff;
    border: 1px solid var(--cpeis-linea, #e6e6e8);
    border-radius: 18px;
    box-shadow: 0 8px 22px rgba(20,20,25,0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.cpeis-tram-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 40px rgba(20,20,25,0.1);
    border-color: #dcdce0;
}
.cpeis-tram-card.is-hidden { display: none; }
.cpeis-tram-card__top {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    margin-bottom: 0.9rem;
}
.cpeis-tram-card__ico {
    flex: none;
    display: inline-flex;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: var(--cpeis-acento, #ce1019);
    background: rgba(206,16,25,0.09);
}
.cpeis-tram-card__ico svg { width: 24px; height: 24px; }
.cpeis-tram-card__cat {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #86868c;
}
.cpeis-tram-card__title {
    margin: 0 0 0.5rem;
    font-size: 1.12rem;
    line-height: 1.25;
    letter-spacing: -0.01em;
    color: var(--cpeis-tinta, #1b1b1f);
}
.cpeis-tram-card__desc {
    margin: 0 0 1rem;
    font-size: 0.94rem;
    line-height: 1.5;
    color: var(--cpeis-texto, #55555b);
}
/* Lista de formularios dentro de cada procedimiento. */
.cpeis-tram-card__forms {
    list-style: none;
    margin: 0 0 0.5rem;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.cpeis-tram-card__forms li {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.9rem;
    line-height: 1.4;
    color: var(--cpeis-texto, #4a4a50);
}
.cpeis-tram-card__forms li svg {
    flex: none;
    width: 17px;
    height: 17px;
    margin-top: 1px;
    color: var(--cpeis-acento, #ce1019);
    opacity: 0.85;
}

.cpeis-tram-card__meta { margin-top: auto; }
.cpeis-tram-card__canal {
    display: inline-flex;
    align-items: center;
    padding: 0.28rem 0.6rem;
    font-size: 0.76rem;
    font-weight: 600;
    color: #2a7d5a;
    background: rgba(22,177,135,0.12);
    border-radius: 8px;
}
.cpeis-tram-card__actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid var(--cpeis-linea, #eeeef0);
}
.cpeis-tram-card__go {
    display: inline-flex;
    align-items: center;
    gap: 0.4em;
}
.cpeis-tram-card__go svg { width: 16px; height: 16px; }
.cpeis-tram-card__pdf {
    display: inline-flex;
    align-items: center;
    gap: 0.35em;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--cpeis-acento, #ce1019);
    text-decoration: none;
}
.cpeis-tram-card__pdf svg { width: 17px; height: 17px; }
.cpeis-tram-card__pdf:hover { text-decoration: underline; }
.cpeis-tram-card__pdf.is-disabled {
    color: #b6b6bb;
    cursor: default;
}

.cpeis-tram-empty {
    margin-top: 2rem;
    padding: 2rem;
    text-align: center;
    color: #86868c;
    background: #f6f6f7;
    border-radius: 16px;
}

@media (prefers-reduced-motion: reduce) {
    .cpeis-tram-card { transition: none; }
    .cpeis-tram-card:hover { transform: none; }
}
