:root{
  --bvb:#FFD400;
  --ink:#0b0b0b;
  --card:#ffffff;
  --muted:#4b4b4b;
  --line:rgba(0,0,0,.12);
  --shadow: 0 10px 30px rgba(0,0,0,.12);
  --radius2: 24px;
}

*{box-sizing:border-box}
html,body{height:100%}
html, body { overflow-x: hidden; }

body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Noto Sans", "Helvetica Neue", sans-serif;
  background: var(--bvb);
  color: var(--ink);
}

.wrap{max-width:1080px;margin:0 auto;padding:18px}
main section{ margin-bottom: 30px; }

.topbar{
  position:sticky;top:0;z-index:10;
  background: rgba(0,0,0,.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.topbar__inner{display:flex;align-items:center;justify-content:space-between;gap:12px}

.brand{display:flex;align-items:center;gap:12px}
.brand__text{display:flex;flex-direction:column;gap:2px}
.brand__title{font-weight:900;color:#fff;line-height:1}
.brand__sub{font-size:12px;color:rgba(255,255,255,.72)}
.logo{ height:44px; width:auto; object-fit:contain; }

.topbar__actions{display:flex;gap:10px;flex-wrap:wrap;align-items:center}

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  text-decoration:none;
  border:0;cursor:pointer;
  padding:10px 14px;border-radius:14px;
  background:#fff;color:#000;
  font-weight:900;
  box-shadow: 0 8px 18px rgba(0,0,0,.12);
  transition: transform .12s ease;
}
.btn--dark{background:#FFD400;color:#000}
.btn:hover{transform: translateY(-1px)}
.btn:active{transform: translateY(0)}

.muted{color:rgba(0,0,0,.65)}
.small{font-size:12px}

.card{
  background: var(--card);
  border:1px solid var(--line);
  border-radius: var(--radius2);
  box-shadow: var(--shadow);
  overflow:hidden;
}
.card__head{
  display:flex;align-items:center;justify-content:space-between;
  gap:10px;padding:14px 16px;
  border-bottom:1px solid var(--line);
}
.card__head h2{margin:0;font-size:16px}
.card__body{padding:14px 16px}

.filters{padding:12px}
.filters__hint{margin-top:10px}

/* CATEGORÍAS */
.categories-bar{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  padding:12px;
  justify-content:flex-start;
}
.cat-btn{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  padding:8px 12px;
  border-radius:999px;
  background:#fff;
  border:1px solid rgba(0,0,0,.15);
  font-size:12px;
  font-weight:900;
  cursor:pointer;
  transition:all .2s ease;
}
.cat-btn:hover{ transform:translateY(-2px); }
.cat-btn.active{
  background:#000;
  color:#FFD400;
  border-color:#000;
}

/* FEED */
.feed{ display:flex; flex-direction:column; gap:16px; }
.post{
  background:#fff;
  border:1px solid rgba(0,0,0,.12);
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(0,0,0,.12);
  overflow:hidden;
}
.post__head{
  display:flex;
  gap:12px;
  align-items:center;
  padding:14px 16px;
}
.post__avatar{
  width:44px;height:44px;
  border-radius:14px;
  background:#000;
  display:grid;
  place-items:center;
  overflow:hidden;
  flex: 0 0 44px;
}
.post__avatar img{
  width:100%;height:100%;
  object-fit:contain;
  background:#000;
}
.post__meta{ flex:1; min-width:0; }
.post__name{ font-weight:900; line-height:1.1; }
.post__sub{ font-size:12px; color:rgba(0,0,0,.65); margin-top:2px; }
.post__tag{
  font-size:12px;
  font-weight:900;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid rgba(0,0,0,.12);
}
.post__tag.urgent{background: rgba(255,0,0,.12); border-color: rgba(255,0,0,.25)}
.post__tag.important{background: rgba(255,140,0,.14); border-color: rgba(255,140,0,.25)}
.post__tag.info{background: rgba(0,0,0,.06);}

.post__body{ padding: 0 16px 14px; }
.post__title{ font-weight:900; margin: 2px 0 8px; }
.post__text{ color:rgba(0,0,0,.80); line-height:1.4; white-space:pre-line; }

.post__kv{
  margin-top:12px;
  border:1px solid rgba(0,0,0,.12);
  border-radius:14px;
  padding:10px 12px;
  background: rgba(255,212,0,.12);
  display:grid;
  gap:6px;
}
.post__kv b{ font-size:12px; }

.post__actions{
  border-top:1px solid rgba(0,0,0,.10);
  padding:10px 12px;
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}
.actionbtn{
  border:1px solid rgba(0,0,0,.12);
  background:#fff;
  border-radius: 999px;
  padding:8px 12px;
  font-weight:900;
  cursor:pointer;
  text-decoration:none;
  color:#000;
  transition: transform .12s ease;
}
.actionbtn:hover{ transform: translateY(-1px); }

/* CALENDARIO */
.week{
  display:grid;
  grid-template-columns: repeat(7, 1fr);
  gap:10px;
  padding: 12px 16px 16px;
}
.day{
  border:1px solid var(--line);
  border-radius: 18px;
  padding:10px;
  background: rgba(255,255,255,.92);
}
.day__head{
  display:flex;align-items:center;justify-content:space-between;
  gap:8px;margin-bottom:8px;
}
.day__name{font-weight:900}
.badge{
  font-size:11px;font-weight:900;
  padding:4px 8px;border-radius:999px;
  background: rgba(0,0,0,.06);
  border: 1px solid var(--line);
}
.event{
  border:1px solid var(--line);
  border-radius: 14px;
  padding:8px;margin-top:8px;
}
.event__t{font-weight:900;font-size:12px}
.event__m{font-size:11px;color:rgba(0,0,0,.65);margin-top:2px}
.event a{color:#000;font-weight:900;text-decoration:underline}

/* HERO BVB */
.hero-bvb{
  position:relative;
  height: 58vh;
  min-height:420px;
  background:url('/comunicados/hero.jpg') center/cover no-repeat;
  display:flex;
  align-items:flex-end;
  color:#fff;
  overflow:hidden;
}
.hero-bvb--small{
  height: 36vh;
  min-height: 280px;
}
.hero-bvb__overlay{
  position:absolute;
  inset:0;
  background: linear-gradient(120deg, rgba(0,0,0,.85), rgba(0,0,0,.40));
}
.hero-bvb__content{
  position:relative;
  padding-bottom:40px;
  z-index:2;
}
.hero-bvb__tag{
  display:inline-block;
  background:#FFD400;
  color:#000;
  font-weight:900;
  padding:6px 14px;
  border-radius:6px;
  margin-bottom:14px;
  font-size:14px;
  letter-spacing:.5px;
}
.hero-bvb__title{
  font-size:42px;
  font-weight:900;
  line-height:1.1;
  max-width:720px;
  margin:0;
}
.hero-bvb__subtitle{
  margin:10px 0 0;
  color: rgba(255,255,255,.85);
  font-weight:700;
  max-width: 720px;
}
.hero-bvb__controls{
  position:absolute;
  bottom:30px;
  right:18px;
}
.hero-bvb__allnews{
  background:#fff;
  color:#000;
  font-weight:900;
  border:none;
  padding:12px 22px;
  border-radius:6px;
  cursor:pointer;
  letter-spacing:.5px;
  box-shadow: var(--shadow);
}
.hero-bvb__allnews:hover{ transform:translateY(-2px); }

.footer{padding:18px 2px 30px;color:rgba(0,0,0,.6);font-size:12px;text-align:center}

/* RESPONSIVE */
@media (max-width: 768px){
  .topbar__actions{
    width:100%;
  }
  .topbar__actions .btn{
    flex:1;
    min-width: 160px;
  }
}
@media (max-width: 768px){
  .wrap{ padding: 14px; }
  .logo{ height:38px; }
  .week{ grid-template-columns: 1fr !important; padding: 12px 14px 14px; }
  .hero-bvb{ height: 52vh; min-height: 360px; }
  .hero-bvb__title{ font-size: 26px; }
  .hero-bvb__controls{ position: static; margin-top: 18px; }
  .categories-bar{ justify-content:center; }
}

.post__pdf{
  margin-top:12px;
  padding:10px 12px;
  background: rgba(255,212,0,.18);
  border:1px solid rgba(0,0,0,.15);
  border-radius:12px;
}

.post__pdf a{
  font-weight:900;
  text-decoration:none;
  color:#000;
}

.post__pdf a:hover{
  text-decoration:underline;
}

#backTop{
  position:fixed;
  right:20px;
  bottom: calc(20px + env(safe-area-inset-bottom));
  width:48px;
  height:48px;
  border-radius:50%;
  background:#000;
  color:#FFD400;
  border:none;
  font-size:20px;
  font-weight:900;
  cursor:pointer;
  box-shadow:0 10px 25px rgba(0,0,0,.3);
  display:none;
  z-index:999;
}

.topbar{
  background: rgba(0,0,0,.92);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

#backTop:hover{ transform: translateY(-2px); }
#backTop:active{ transform: translateY(0px); }
