/* P3_TRAMITES_UX_GROUPED_V1 — immutable CSP v10 */
.tramites-page{padding-top:32px}

.eu-tramites-featured{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:16px;
  margin:26px 0 34px;
}
.eu-tramites-featured .eu-apost-feature,
.eu-tramites-featured .eu-bach-feature{
  box-sizing:border-box;
  width:100%;
  max-width:none;
  min-width:0;
  min-height:0;
  margin:0;
  padding:20px 22px;
  border-radius:20px;
  gap:18px;
}
.eu-tramites-featured .eu-apost-feature h2,
.eu-tramites-featured .eu-bach-feature h2{
  margin:8px 0 7px;
  font-size:clamp(21px,2vw,25px);
  line-height:1.12;
  letter-spacing:-.5px;
}
.eu-tramites-featured .eu-apost-feature p,
.eu-tramites-featured .eu-bach-feature p{
  font-size:14px;
  line-height:1.5;
}
.eu-tramites-featured .eu-apost-feature>a,
.eu-tramites-featured .eu-bach-feature>a{
  flex:0 0 auto;
  padding:11px 15px;
  border-radius:13px;
  white-space:nowrap;
}

.tramites-filter-summary{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:12px;
  flex-wrap:wrap;
  margin:-4px auto 26px;
  color:#64748b;
  font-size:14px;
}
.tramites-filter-summary strong{color:#0f172a}
.tramites-filter-summary a{
  display:inline-flex;
  align-items:center;
  padding:7px 11px;
  border:1px solid #bbf7d0;
  border-radius:999px;
  background:#ecfdf5;
  color:#047033;
  font-size:12px;
  font-weight:850;
  text-decoration:none;
}
.tramites-filter-summary a:hover,
.tramites-filter-summary a:focus-visible{
  border-color:#0f8f42;
  background:#dcfce7;
  outline:2px solid transparent;
}

.tramite-card-main-link{
  display:flex;
  flex-direction:column;
  min-width:0;
  color:inherit;
  text-decoration:none;
}
.tramite-card-main-link>p{
  display:-webkit-box;
  overflow:hidden;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:4;
}
.tramite-card-main-link:focus-visible{
  border-radius:12px;
  outline:3px solid rgba(15,143,66,.28);
  outline-offset:4px;
}
.tramite-card-cta{
  display:inline-flex;
  align-items:center;
  gap:7px;
  width:fit-content;
  margin-top:17px;
  color:#047033;
  font-size:14px;
  font-weight:900;
}
.tramite-card:hover .tramite-card-cta{color:#0f8f42}

.tramites-empty-state{
  grid-column:1/-1;
  width:min(680px,100%);
  margin:8px auto 28px;
  padding:48px 28px;
  border:1px solid #dbe7df;
  border-radius:24px;
  background:rgba(255,255,255,.82);
  text-align:center;
  box-shadow:0 16px 40px rgba(15,23,42,.07);
}
.tramites-empty-icon{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:54px;
  height:54px;
  margin-bottom:16px;
  border-radius:18px;
  background:#ecfdf5;
  color:#0f8f42;
  font-size:24px;
}
.tramites-empty-state h3{
  margin:0 0 9px;
  color:#0f172a;
  font-size:25px;
  font-weight:900;
}
.tramites-empty-state p{
  max-width:520px;
  margin:0 auto;
  color:#64748b;
  line-height:1.6;
}
.tramites-empty-actions{
  display:flex;
  justify-content:center;
  gap:10px;
  flex-wrap:wrap;
  margin-top:22px;
}
.tramites-empty-actions a{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:44px;
  padding:0 16px;
  border-radius:13px;
  font-weight:850;
  text-decoration:none;
}
.tramites-empty-primary{
  border:1px solid #0f8f42;
  background:#0f8f42;
  color:#fff;
}
.tramites-empty-secondary{
  border:1px solid #d7e7dd;
  background:#fff;
  color:#047033;
}

body.dark-mode .tramites-filter-summary{color:#94a3b8}
body.dark-mode .tramites-filter-summary strong{color:#f8fafc}
body.dark-mode .tramites-filter-summary a{
  border-color:#31533f;
  background:#16243a;
  color:#bbf7d0;
}
body.dark-mode .tramite-card-cta{color:#86efac}
body.dark-mode .tramites-empty-state{
  border-color:#2b3a54;
  background:#111c2f;
  box-shadow:none;
}
body.dark-mode .tramites-empty-icon{
  background:#16243a;
  color:#86efac;
}
body.dark-mode .tramites-empty-state h3{color:#f8fafc}
body.dark-mode .tramites-empty-state p{color:#cbd5e1}
body.dark-mode .tramites-empty-secondary{
  border-color:#334155;
  background:#16243a;
  color:#bbf7d0;
}

@media(max-width:767.98px){
  .eu-tramites-featured{
    grid-template-columns:1fr;
    gap:12px;
    margin:20px 0 28px;
  }
  .eu-tramites-featured .eu-apost-feature,
  .eu-tramites-featured .eu-bach-feature{
    display:block;
    padding:18px;
  }
  .eu-tramites-featured .eu-apost-feature>a,
  .eu-tramites-featured .eu-bach-feature>a{
    display:flex;
    justify-content:center;
    width:100%;
    margin-top:14px;
  }
}

@media(max-width:576px){
  .tramites-page{padding-top:24px}
  .tramites-categories{
    box-sizing:border-box;
    display:flex;
    flex-wrap:nowrap;
    justify-content:flex-start;
    max-width:100%;
    overflow-x:auto;
    overscroll-behavior-x:contain;
    gap:9px;
    margin-bottom:24px;
    padding:0 2px 9px;
    scrollbar-width:none;
    -webkit-overflow-scrolling:touch;
  }
  .tramites-categories::-webkit-scrollbar{display:none}
  .tramites-categories a{
    flex:0 0 auto;
    white-space:nowrap;
    padding:9px 14px;
  }
  .tramite-card-main-link>p{
    -webkit-line-clamp:4;
    font-size:14px;
    line-height:1.55;
  }
  .tramite-card-cta{margin-top:15px}
  .tramites-filter-summary{
    margin-bottom:22px;
    text-align:center;
  }
  .tramites-empty-state{
    padding:34px 18px;
    border-radius:20px;
  }
  .tramites-empty-actions{
    display:grid;
    grid-template-columns:1fr;
  }
  .tramites-empty-actions a{width:100%}
}

/* P3_SEARCH_LABEL_A11Y_V11
   Keep the explicit form label accessible to assistive technology while
   preventing it from becoming visible inside the styled search control. */
.tramites-search > label.visually-hidden[for="tramites-search-input"] {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    clip-path: inset(50%) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

