/* 🔥 Google Font */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap");

/* 🔁 Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* 🌐 Root */
:root {
  --primary: #4f46e5;
  --secondary: #9333ea;
  --text: #111827;
  --text-light: #6b7280;
  --bg: #f9fafb;
  --card-bg: rgba(255, 255, 255, 0.7);
}

/* 🧠 Body */
body {
  font-family: "Inter", sans-serif;
  color: var(--text);
  line-height: 1.6;
  background-color: #454444;

  /* 🔥 Base responsive font */
  font-size: clamp(14px, 1vw, 16px);
}

/* 📦 Container */
.container {
  max-width: 1300px;
  margin: auto;
  padding: clamp(1.5rem, 3vw, 2rem);
}

/* 🧾 Header */
.header_container {
  text-align: center;
  margin-bottom: clamp(2rem, 4vw, 3rem);
}

.header_title {
  font-size: clamp(2.7rem, 10vw, 5rem);
  font-weight: 800;
  line-height: 1;
  background: linear-gradient(to right, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  color: transparent;
}

.headerDiscription {
  max-width: 700px;
  margin: 1rem auto 0;
  color: var(--text-light);
  font-size: clamp(0.8rem, 1.3vw, 1.15rem);
}

/* 🧱 Grid */
.cardsContainers {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: clamp(1.2rem, 2vw, 2rem);
}

/* 🃏 Card */
.card_container {
  background: var(--card-bg);
  backdrop-filter: blur(12px);
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.3);
  transition: all 0.4s ease;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  cursor: pointer;
}

.card_container:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 25px 40px rgba(0, 0, 0, 0.12);
}

/* 🖼 Image */
.card_Imag_Container {
  height: clamp(160px, 20vw, 200px);
  overflow: hidden;
}

.cardImg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: 0.5s;
}

.card_container:hover .cardImg {
  transform: scale(1.1);
}

/* 📝 Content */
.card_titale_container {
  padding: clamp(1rem, 2vw, 1.4rem);
  flex-grow: 1;
}

.card_titale {
  font-size: clamp(1.7rem, 1.5vw, 2rem);
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--primary);
}

.card_discription {
  font-size: clamp(0.85rem, 1vw, 0.5rem);
  color: #4b5563;
  line-height: 1.6;

  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 🔽 Footer */
.card_footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: clamp(0.8rem, 1.5vw, 1rem);
}

/* 👤 Author */
.card_autor_caontainer {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.card_avtar {
  width: clamp(32px, 4vw, 38px);
  height: clamp(32px, 4vw, 38px);
  border-radius: 50%;
  overflow: hidden;
}

.card_avtar_img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.autor_name {
  font-size: clamp(0.8rem, 1vw, 1rem);
  font-weight: 600;
}

.autor_date {
  font-size: clamp(0.65rem, 0.8vw, 0.8rem);
  color: #999;
}

/* 🏷 Tag */
.tag span {
  font-size: clamp(0.65rem, 0.8vw, 0.8rem);
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: linear-gradient(to right, var(--primary), var(--secondary));
  color: white;
  font-weight: 600;
}
/* 🏷 Tag */
.tag {
  font-size: clamp(0.65rem, 0.8vw, 0.8rem);
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: linear-gradient(to right, var(--primary), var(--secondary));
  color: white;
  font-weight: 600;
}

#scrollTopBtn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 100;

  width: 45px;
  height: 45px;

  border: none;
  outline: none;
  cursor: pointer;

  background: linear-gradient(135deg, #4f46e5, #9333ea);
  color: white;
  font-size: 1.2rem;
  border-radius: 50%;

  display: flex;
  align-items: center;
  justify-content: center;

  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);

  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

/* show button */
#scrollTopBtn.show {
  opacity: 1;
  visibility: visible;
}

/* hover */
#scrollTopBtn:hover {
  transform: translateY(-3px) scale(1.1);
}
