@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600&display=swap');

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Poppins', sans-serif;
  background-color: #f9f9f9;
  color: #333;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  background-color: #ffffff;
  text-align: center;
  padding: 1rem 0.5rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  z-index: 1000;
}

.blog-title {
  font-size: 2rem;
  font-weight: 600;
  color: #2f80ed;
  letter-spacing: 1px;
}

.blog-slogan {
  font-size: 1rem;
  color: #777;
  margin-top: 0.25rem;
}

/* Layout */
.layout {
  display: flex;
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 1rem;
  gap: 2rem;
}

/* Sidebar */
.sidebar {
  width: 250px;
  background-color: #fff;
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.05);
  flex-shrink: 0;
  height: fit-content;
  position: sticky;
  top: 100px;
}

.sidebar ul {
  list-style: none;
}

.sidebar li {
  margin-bottom: 1rem;
  position: relative;
}

.sidebar a {
  text-decoration: none;
  color: #2f80ed;
  font-weight: 500;
  display: block;
  transition: color 0.2s ease;
}

.sidebar a:hover {
  color: #1c60c8;
}

/* Submenu Styling */
.has-submenu > a::after {
  content: " ▼";
  font-size: 0.7em;
  color: #999;
}

.submenu {
  margin-top: 0.5rem;
  margin-left: 1rem;
  padding-left: 1rem;
  border-left: 2px solid #eee;
  display: none;
}

.has-submenu:hover > .submenu {
  display: block;
}

.submenu li {
  margin-bottom: 0.5rem;
}

.ad-space {
  padding: 1rem;
  border: 1px dashed #ccc;
  text-align: center;
  font-size: 0.9rem;
  color: #999;
  margin-top: 2rem;
}

/* Main Content */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* Blog Card */
.card {
  background-color: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
  max-width: 100%;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
}

.card-image {
  width: 100%;
  height: auto;
  display: block;
}

.card-content {
  padding: 1.5rem;
}

.card-title {
  font-size: 1.6rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: #333;
}

.card-description {
  font-size: 1rem;
  color: #555;
  line-height: 1.6;
  margin-bottom: 1.25rem;
}

.card-button {
  text-decoration: none;
  font-size: 1rem;
  color: #2f80ed;
  font-weight: 500;
  transition: color 0.2s ease;
}

.card-button:hover {
  color: #1c60c8;
}

/* Tablet/Mobile Responsive */
@media (max-width: 768px) {
  .layout {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    position: static;
    margin-bottom: 2rem;
  }

  .main-content {
    width: 100%;
  }

  .submenu {
    display: block; /* Always visible for mobile */
  }
}

/* Mobile Specific */
@media (max-width: 480px) {
  .card {
    border-radius: 12px;
  }

  .card-content {
    padding: 1rem;
  }

  .card-title {
    font-size: 1.3rem;
  }

  .card-description,
  .card-button {
    font-size: 0.95rem;
  }

  .blog-title {
    font-size: 1.5rem;
  }

  .blog-slogan {
    font-size: 0.9rem;
  }
}

/* Safe Pastel Tile Styling for Sidebar Links */
.sidebar a {
  padding: 0.6rem 1rem;
  border-radius: 12px;
  display: inline-block;
  transition: background-color 0.3s ease, color 0.2s ease;
  color: #333; /* Darker text for better contrast */
  font-weight: 600;
}

/* Different pastel backgrounds */
.tile-about {
  background-color: #ffe0e6;
}

.tile-topics {
  background-color: #e0f7fa;
}

.tile-popular {
  background-color: #fff3cd;
}

.tile-random {
  background-color: #f3e5f5;
}

.tile-healthcare {
  background-color: #e8f5e9;
}

.tile-health {
  background-color: #ffebee;
}

.tile-radiology {
  background-color: #e3f2fd;
}

.tile-pharma {
  background-color: #fffde7;
}

.tile-economy {
  background-color: #e1f5fe;
}

.tile-international {
  background-color: #f9fbe7;
}

.tile-defence {
  background-color: #fce4ec;
}

.tile-astronomy {
  background-color: #f3f3fc;
}

.tile-religion {
  background-color: #e8eaf6;
}

/* Hover states for tiles */
.sidebar a:hover {
  background-color: #d1e9ff !important;
  color: #1c60c8 !important;
  text-decoration: none;
}

/* Keep submenu styling intact */
.has-submenu > a::after {
  content: " ▼";
  font-size: 0.7em;
  color: #666;
  margin-left: 6px;
}

/* Submenu links get slightly smaller padding */
.submenu a {
  padding: 0.4rem 1rem;
  font-weight: 500;
  border-radius: 10px;
  display: inline-block;
}

/* On mobile, ensure tiles still look good */
@media (max-width: 768px) {
  .sidebar a {
    padding: 0.5rem 0.75rem;
    font-size: 0.95rem;
  }
  
  .submenu a {
    padding-left: 1.5rem;
  }
}







/* ======================= */
/*        SITE FOOTER       */
/* ======================= */

.site-footer {
  background: #ffffff;
  margin-top: 3rem;
  padding: 2.5rem 1rem 1.5rem;
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.04);
  border-top-left-radius: 18px;
  border-top-right-radius: 18px;
}

.footer-container {
  max-width: 1200px;
  margin: auto;
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}

.footer-column h3,
.footer-column h4 {
  font-weight: 600;
  color: #2f80ed;
  margin-bottom: 1rem;
}

.footer-desc {
  color: #555;
  line-height: 1.6;
  max-width: 260px;
}

.footer-column ul {
  list-style: none;
}

.footer-column ul li {
  margin-bottom: 0.6rem;
}

.footer-column a {
  color: #333;
  text-decoration: none;
  transition: color 0.2s ease;
  font-weight: 500;
}

.footer-column a:hover {
  color: #1c60c8;
}

.footer-bottom {
  text-align: center;
  margin-top: 2rem;
  font-size: 0.9rem;
  color: #777;
}


/* FORCE footer links to use footer styles (override sidebar link rules) */
.site-footer a {
  background: none;
  padding: 0;
  font-weight: 500;
  color: #333;
  display: inline;
}

.site-footer a:hover {
  color: #1c60c8;
  background: none;
  text-decoration: underline;
}


