:root{
  --navy:#0b1f3a;
  --navy2:#0a2a4a;
  --gray:#eef2f7;
  --text:#111827;
  --muted:#6b7280;
  --card:#ffffff;
  --stroke:rgba(15,23,42,.10);
  --accent:#ef4444;
  --shadow: 0 10px 30px rgba(2,6,23,.08);
  --radius:18px;
}
/* FIX overflow for buttons/cards */
.a-wrap, .a-wrap *{
  box-sizing: border-box;
}

.a-sidecard{
  overflow: hidden;      /* safety */
}

.a-sidecard__btn{
  max-width: 100%;
  width: 100%;
}

/* Hero */
.a-hero{
  background: linear-gradient(135deg, var(--navy), var(--navy2));
  color:#fff;
  padding: 34px 16px;
}
.a-hero--small{ padding: 26px 16px; }
.a-hero__inner{
  max-width: 1200px;
  margin: 0 auto;
}
.a-hero__title{
  margin:0 0 8px;
  font-size: clamp(20px, 2.2vw, 34px);
  font-weight: 900;
  letter-spacing: -0.2px;
}
.a-hero__subtitle{
  margin:0;
  opacity:.9;
  color: rgba(255,255,255,.9);
  font-size: 14px;
  line-height: 1.9;
}

/* Layout */
.a-wrap{
  background: #fff;
}
.a-layout{
  max-width: 1200px;
  margin: 0 auto;
  padding: 22px 16px 40px;
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 18px;
}
@media (max-width: 992px){
  .a-layout{ grid-template-columns: 1fr; }
}

/* Sidebar */
.a-sidecard{
  background: var(--card);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px;
  position: sticky;
  top: 14px;
}
@media (max-width: 992px){
  .a-sidecard{ position: static; }
}
.a-sidecard__head{
  background: var(--accent);
  color:#fff;
  border-radius: 12px;
  padding: 10px 12px;
  font-weight: 800;
  text-align: center;
}
.a-sidecard__text{
  margin: 12px 2px 14px;
  color: var(--text);
  line-height: 1.9;
  font-size: 14px;
}
.a-sidecard__btn{
  display:block;
  width:100%;
  text-align:center;
  padding: 12px 12px;
  border-radius: 12px;
  border: 1px solid var(--stroke);
  text-decoration:none;
  color: var(--navy);
  background: #fff;
  font-weight: 800;
  margin-bottom: 10px;
  transition: .15s ease;
}
.a-sidecard__btn:hover{ transform: translateY(-1px); }
.a-sidecard__btn--primary{
  background: #16a34a;
  color:#fff;
  border-color: rgba(0,0,0,0);
}
.a-sidecard__hint{
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}

/* Grid cards */
.a-grid{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
@media (max-width: 1100px){
  .a-grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px){
  .a-grid{ grid-template-columns: 1fr; }
}
.a-card{
  background: var(--card);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  display:flex;
  flex-direction: column;
}
.a-card__media{
  display:block;
  aspect-ratio: 16/9;
  overflow:hidden;
  background: var(--gray);
}
.a-card__media img{
  width:100%;
  height:100%;
  object-fit: cover;
  display:block;
}
.a-card__placeholder{
  width:100%;
  height:100%;
  background:
    radial-gradient(circle at 20% 20%, rgba(255,255,255,.45), transparent 35%),
    linear-gradient(135deg, rgba(11,31,58,.14), rgba(11,31,58,.02));
}
.a-card__body{
  padding: 14px 14px 16px;
  display:flex;
  flex-direction: column;
  height:100%;
}
.a-card__meta{
  display:flex;
  justify-content: flex-end;
  margin-bottom: 8px;
}
.a-card__date{
  font-size: 12px;
  color: var(--muted);
}
.a-card__title{
  margin:0 0 10px;
  font-size: 16px;
  line-height: 1.7;
  font-weight: 900;
}
.a-card__title a{
  color: var(--navy);
  text-decoration:none;
}
.a-card__summary{
  margin:0 0 14px;
  color: var(--text);
  opacity: .92;
  line-height: 1.9;
  font-size: 13px;
  flex: 1;
}
.a-card__more{
  align-self: flex-end;
  text-decoration:none;
  color: #1d4ed8;
  font-weight: 800;
  font-size: 13px;
}
.a-empty{
  grid-column: 1 / -1;
  background: var(--gray);
  border: 1px dashed rgba(15,23,42,.18);
  border-radius: var(--radius);
  padding: 18px;
  color: var(--muted);
}

/* Pager */
.a-pager{
  grid-column: 1 / -1;
  display:flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}
.a-pager__btn{
  border: 1px solid var(--stroke);
  background: #fff;
  padding: 10px 12px;
  border-radius: 12px;
  text-decoration:none;
  color: var(--navy);
  font-weight: 800;
}
.a-pager__info{
  color: var(--muted);
  font-size: 13px;
}

/* Detail */
.a-detail{
  max-width: 900px;
  margin: 0 auto;
  background: var(--card);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
}
.a-detail__cover{
  width:100%;
  border-radius: 14px;
  border: 1px solid var(--stroke);
  margin-bottom: 12px;
}
.a-detail__summary{
  color: var(--muted);
  line-height: 1.9;
  margin: 6px 0 14px;
}
.a-detail__content{
  color: var(--text);
  line-height: 2.05;
  font-size: 15px;
}
.a-detail__back{
  margin-top: 18px;
}
.a-detail__back a{
  text-decoration:none;
  font-weight: 900;
  color: var(--navy);
}
