@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

/* ======================== */
/* RESET & BASE STYLES      */
/* ======================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Poppins', sans-serif;
  background: #FFFFFF;
  color: #000000;
  line-height: 1.6;

  /* sticky footer */
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ======================== */
/* HEADER                   */
/* ======================== */
header {
  background: #FFFFFF;
  padding: 20px 10px;
  text-align: center;
  border-bottom: 3px solid #FF0000;
}

header h1 {
  color: #FF0000;
  font-size: 2.2rem;
  font-weight: 700;
  letter-spacing: 1px;
}

/* ======================== */
/* NAVIGATION BAR           */
/* ======================== */
nav {
  background: #FF0000;
  padding: 10px 0;
}

nav ul {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 25px;
  flex-wrap: wrap;
}

nav a {
  text-decoration: none;
  color: #FFFFFF;
  font-weight: 500;
  font-size: 0.95rem;
  padding: 6px 12px;
  border-radius: 4px;
  transition: 0.3s;
}

nav a:hover {
  background: #FFFFFF;
  color: #FF0000;
}

/* ======================== */
/* MAIN CONTAINER / GRID    */
/* ======================== */
.container {
  max-width: 1200px;
  margin: 20px auto; /* less top/bottom space for more rows */
  padding: 0 15px;
  flex: 1; /* pushes footer down */
}

.grid, .main-grid {
  display: grid;
  grid-template-columns: 2fr 1fr; /* 2 columns per row */
  gap: 15px; /* smaller gap to show more rows */
}

/* ======================== */
/* ARTICLE / INFO / CALC CARDS */
/* ======================== */
.article-card,
.info-card,
.calc-card,
.sidebar {
  background: #FFFFFF;
  padding: 14px;          /* smaller padding inside cards */
  border-radius: 8px;
  margin-bottom: 12px;    /* smaller space between rows */
  box-shadow: 0 3px 8px rgba(0,0,0,0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.article-card:hover,
.info-card:hover,
.calc-card:hover,
.sidebar:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0,0,0,0.1);
}

/* Article Titles & Text */
.article-card h3,
.info-card h3 {
  margin-bottom: 8px;
  font-size: 1.2rem;
}

.article-card h3 a,
.info-card h3 a {
  color: #FF0000;
  font-weight: 600;
  text-decoration: none;
}

.article-card h3 a:hover,
.info-card h3 a:hover {
  text-decoration: underline;
}

.article-card p,
.info-card p,
.calc-card p {
  font-size: 0.9rem;
  color: #333;
  margin-bottom: 8px; /* smaller spacing inside cards */
}

/* ======================== */
/* IMAGES IN CARDS / ARTICLES */
/* ======================== */
.article-card img,
.info-card img,
.blog-article img,
.calc-card img {
  width: 90%;
  max-width: 300px; /* smaller images to save space */
  height: auto;
  display: block;
  margin: 10px auto;
  border-radius: 6px;
}

/* ======================== */
/* SIDEBAR                  */
/* ======================== */
.sidebar {
  box-shadow: 0 3px 8px rgba(0,0,0,0.06);
}

.sidebar h3 {
  margin-bottom: 10px;
  font-size: 1.15rem;
  font-weight: 600;
}

.trending {
  padding-left: 12px;
}

.trending li {
  margin-bottom: 6px;
}

.trending a {
  text-decoration: none;
  color: #FF0000;
  font-size: 0.9rem;
}

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

/* ======================== */
/* INFO BOXES               */
/* ======================== */
.info-box {
  background: #FFFFFF;
  border-left: 4px solid #FF0000;
  padding: 14px;
  border-radius: 6px;
  margin: 16px 0;
}

/* ======================== */
/* FOOTER (STICKY)          */
/* ======================== */
footer {
  background: #FF0000;
  color: #FFFFFF;
  text-align: center;
  padding: 20px 10px;
}

footer ul {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-bottom: 10px;
}

footer li {
  margin: 0;
}

footer a {
  color: #FFFFFF;
  text-decoration: none;
  font-size: 0.9rem;
}

footer a:hover {
  text-decoration: underline;
}

/* ======================== */
/* RESPONSIVE DESIGN        */
/* ======================== */
@media (max-width: 1024px){
  .grid, .main-grid {
    grid-template-columns: 1fr; /* single column on tablets for readability */
  }
}

@media (max-width: 768px){
  header h1 {
    font-size: 1.8rem;
  }
  nav ul {
    flex-direction: column;
    gap: 10px;
  }
  .article-card,
  .info-card,
  .calc-card,
  .sidebar {
    padding: 12px;
  }
  .container {
    margin: 15px auto;
    padding: 0 10px;
  }
}
