/* ===== General Styles ===== */
html, body {
  margin: 0;
  padding: 0;
  min-height: 100vh; /* ensures full viewport height */
  display: flex;
  flex-direction: column;
  font-family: Arial, sans-serif;
  background: #121212;
  color: #fff;
}

header {
  background: #1f1f1f;
  padding: 15px;
  text-align: center;
}

header h1 {
  margin: 0;
  color: #ff4757;
}

nav {
  background: #2b2b2b;
  display: flex;
  justify-content: center;
  gap: 20px;
  padding: 10px;
}

nav a {
  text-decoration: none;
  color: #fff;
  font-weight: bold;
}

nav a:hover {
  color: hsl(290, 100%, 64%);
}

nav a.active {
  color: #ff4757;
  border-bottom: 2px solid #ff4757;
}

/* ===== Main Layout ===== */
.container {
  display: flex;
  gap: 20px;
  margin: 20px;
  flex: 1; /* fills remaining space to push footer down */
  align-items: flex-start;
  justify-content: flex-start;
}

.articles {
  flex: 3;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  order: 1; /* left side */
}

.card {
  background: #1e1e1e;
  padding: 15px;
  border-radius: 10px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.5);
}

.card img {
  max-width: 100%;
  border-radius: 8px;
}

.card h2 {
  margin-top: 10px;
  color: #ff4757;
}

.read-more {
  color: #ff4757;
  text-decoration: none;
  font-weight: bold;
}

.read-more:hover {
  text-decoration: underline;
}

.author {
  font-style: italic;
  color: #ffa502;
  margin-bottom: 15px;
}

/* Sidebar */
.sidebar {
  flex: 1;
  max-width: 280px;
  background: #1a1a1a;
  padding: 15px;
  border-radius: 10px;
  height: fit-content;
  order: 2; /* right side */
}

/* Footer at bottom */
footer {
  text-align: center;
  padding: 15px;
  background: #1f1f1f;
  flex-shrink: 0; /* prevents footer from shrinking */
}

/* ===== Mobile Responsive ===== */
@media screen and (max-width: 992px) {
  .container {
    flex-direction: column;
  }

  .sidebar {
    max-width: 100%;
    margin-top: 20px;
  }
}

@media screen and (max-width: 768px) {
  nav {
    flex-direction: column;
    gap: 10px;
    padding: 10px 0;
  }

  .articles {
    width: 100%;
  }

  .card img {
    width: 100%;
    height: auto;
  }

  header h1 {
    font-size: 24px;
  }

  .card h2, .card p {
    font-size: 16px;
  }
}

/* ===== Back to Top Button ===== */
#backToTop {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #ff4444;
  color: white;
  border: none;
  padding: 12px 18px;
  border-radius: 50px;
  cursor: pointer;
  font-size: 14px;
  display: none;
  box-shadow: 0 4px 6px rgba(0,0,0,0.3);
  transition: opacity 0.3s, transform 0.3s;
  z-index: 9999;
}

#backToTop:hover {
  background: #cc0000;
  transform: scale(1.1);
}

/* ===== Search Box ===== */
.search-box {
  text-align: center;
  margin: 20px 0;
}

.search-box input {
  width: 100%;
  max-width: 400px;
  padding: 10px 15px;
  border-radius: 25px;
  border: 1px solid #ccc;
  font-size: 16px;
  box-sizing: border-box;
}

@media screen and (max-width: 600px) {
  .search-box input {
    width: 90%;
    font-size: 14px;
  }
}

.whatsapp {
  color: hwb(123 4% 3%);
  text-decoration: none;
  font-weight: bold;
}

.whatsapp:hover {
  text-decoration: underline;
}

.facebook {
  color: oklab(50.827% 0.00712 -0.27622);
  text-decoration: none;
  font-weight: bold;
}

.facebook:hover {
  text-decoration: underline;
}

.info {
  color: oklch(65.716% 0.23032 19.593);
  text-decoration: none;
  font-weight: bold;
}

.info:hover {
  text-decoration: underline;
}

.social-icons a {
    margin: 0 8px;
    display: inline-block;
  }
  .social-icons img {
    width: 28px;
    height: 28px;
    
    transition: 0.3s;
  }
  .social-icons img:hover {
    filter: none; /* show original colors on hover */
    transform: scale(1.1);
  }