:root{
  --bg: linear-gradient(
    135deg,
    #8B0000 10%,
    #330000 45%,
    #0b0b0b 90%
  );

  --panel: #111111;
  --panel-soft: #161616;

  --border: rgba(255,255,255,.06);

  --text: #f5f5f5;
  --muted: #a1a1aa;

  --accent: #dc2626;
  --accent-soft: #fecaca;
}

/* ================================
   RESET / BASE
================================ */
*,
*::before,
*::after{
  box-sizing: border-box;
}

body{
  margin: 0;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
}

a{
  text-decoration: none;
  color: inherit;
}
/* GLOBAL LINK HOVER COLOR */
a:hover{
  color: var(--accent);
}

img{
  max-width: 100%;
  display: block;
}

/* ================================
   HEADER / HERO
================================ */
.blog-header{
  max-width: 1400px;
  margin: auto;
  padding: 90px 20px 50px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 40px;
}

.blog-header h1{
  font-size: clamp(36px, 5vw, 52px);
  font-weight: 800;
  letter-spacing: -1px;
}

.blog-header p{
  margin-top: 12px;
  color: var(--muted);
  max-width: 560px;
  font-size: 17px;
}

/* ================================
   SEARCH
================================ */
.search input{
  background: var(--panel);
  border: 1px solid var(--border);
  padding: 14px 18px;
  border-radius: 14px;
  color: var(--text);
  min-width: 280px;
  outline: none;
}

.search input::placeholder{
  color: var(--muted);
}

.search input:focus{
  border-color: rgba(220,38,38,.4);
}

/* ================================
   MAIN LAYOUT
================================ */
.blog-wrap{
  max-width: 1400px;
  margin: auto;
  padding: 40px 20px 110px;
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 60px;
}

/* ================================
   BLOG GRID
================================ */
.blog-grid{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 32px;
}

/* ================================
   POST CARD
================================ */
.post-card{
  background: linear-gradient(
    180deg,
    var(--panel),
    var(--panel-soft)
  );
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
  box-shadow: 0 20px 40px rgba(0,0,0,.35);
}

.post-card:hover{
  transform: translateY(-6px) scale(1.03);
  border-color: var(--accent);
  box-shadow: 0 25px 60px rgba(220,38,38,.35);
}

.post-card img{
  height: 190px;
  width: 100%;
  object-fit: cover;
  transition: transform .3s ease;
}

.post-card:hover img{
  transform: scale(1.08);
}


.post-body{
  padding: 24px;
}

.post-body time{
  font-size: 12px;
  color: var(--muted);
  display: block;
}

.post-body h2{
  font-size: 18px;
  line-height: 1.4;
  margin: 10px 0 12px;
  font-weight: 700;
}

.post-body h2 a:hover{
  color: var(--accent);
}

.post-body p{
  font-size: 14px;
  color: #d1d5db;
}

/* ================================
   READ MORE
================================ */
.read-more{
  display: inline-block;
  margin-top: 14px;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
}

/* ================================
   SIDEBAR
================================ */
.sidebar{
  position: sticky;
  top: 40px;
}

/* ================================
   SIDEBAR BLOCK
================================ */
.block{
  background: linear-gradient(
    180deg,
    #121212,
    #0e0e0e
  );
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 26px;
  margin-bottom: 30px;
}

.block h3{
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent-soft);
  margin-bottom: 18px;
}

/* ================================
   TRENDING TOPICS
================================ */
.topic a{
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  font-size: 14px;
  border-bottom: 1px solid var(--border);
  transition: .2s;
}

.topic:last-child a{
  border-bottom: none;
}

.topic a:hover{
  color: var(--accent);
}

.topic span{
  color: var(--muted);
  font-size: 12px;
}

/* ================================
   RESPONSIVE
================================ */
@media(max-width: 1100px){
  .blog-wrap{
    grid-template-columns: 1fr;
  }

  .sidebar{
    position: static;
  }
}

@media(max-width: 640px){
  .blog-header{
    flex-direction: column;
    align-items: flex-start;
  }

  .search input{
    width: 100%;
  }
}
.pagination{
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 30px;
}

.pagination span, .pagination a{
    padding: 8px 14px;
    border-radius: 8px;
    background: #1f2933;
    color: #e5e7eb;
    transition: 0.2s;
}

.pagination span.current, .pagination a:hover{
    background: #dc2626;
    color: #fff;
}
