/* ----------------- YLEINEN ----------------- */
body {
  margin: 0;
  padding: 0;
  background-image: url('tausta-2.png');
  background-size: auto; 
  background-color: black;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  color: white;
  font-family: Arial, sans-serif;
  text-align: center;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
}

.main-container {
  width: 70%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 100px;
}

.logo {
  width: 100%;
  max-width: none;
  height: auto;
}

a i {
  color: white;
  font-size: 60px;
}

h1 {
  font-size: 4rem;
  margin: 0.2em 0;
}

h2 {
  font-size: 1.5rem;
  margin: 0.5em 0;
  font-weight: normal;
}

/* ----------------- LINKIT ----------------- */
a:link,
a:visited,
a:hover,
a:active {
  color: white;
  text-decoration: none;
}

.news-text a:link,
.news-text a:visited,
.news-text a:hover,
.news-text a:active {
  text-decoration: underline;
  color: #ccc;
}

.news-text a:hover {
  color: #f0a500;
}

/* ----------------- SPOTIFY / BOXIT ----------------- */
.box-container {
  width: 100%;
  display: flex;
  justify-content: space-between;
  flex-wrap: nowrap;
  margin-top: 2em;
}

.box {
  flex: 1;
  height: 100px;
  background-color: #999;
  margin: 0 5px;
  transition: background-color 0.3s ease;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 15px;
}

.box:hover {
  background-color: #ccc;
}

/* ----------------- UUTISFEED GRID ----------------- */
#news-feed,
.news-feed {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* kaksi uutista vierekkäin desktopissa */
  gap: 1.5rem;
  margin: 3rem 0;
  box-sizing: border-box;
}

/* Kortti: kuva ylhäällä, sisältö alla */
.news-card {
  background-color: #222;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #333;
  box-shadow: 0 6px 18px rgba(0,0,0,0.45);
  display: flex;
  flex-direction: column;
  text-align: left;
}

.news-card img,
.news-card .news-item img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

.news-card .news-content {
  padding: 1rem 1.25rem;
  color: #ddd;
  box-sizing: border-box;
}

.news-card .news-content h3 {
  margin: 0 0 0.5rem 0;
  color: #f0a500;
  font-size: 1.25rem;
}

.news-card .news-content p {
  margin: 0 0 0.75rem 0;
  line-height: 1.5;
  color: #ccc;
}

/* ----------------- RESPONSIVE ----------------- */
@media (max-width: 768px) {
  .main-container {
    width: 95%;
    padding-top: 50px;
  }

body {
  margin: 0;
  padding: 0;
  background-image: url('tausta-2-mobile.png');
  background-size: auto; 
  background-color: black;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  color: white;
  font-family: Arial, sans-serif;
  text-align: center;
}


  .box-container {
    flex-wrap: wrap;
  }

  .box {
    height: 60px;
    margin: 5px;
  }

  a i {
    font-size: 36px;
  }

  #news-feed,
  .news-feed {
    grid-template-columns: 1fr; /* 1 sarake mobiilissa */
    gap: 1rem;
  }
}

/* ----------------- FOOTER ----------------- */
.footer {
  width: 100%;
  background-color: #111;
  padding: 20px 0;
  text-align: center;
  color: #ccc;
  font-size: 1rem;
  margin-top: 40px;
  border-top: 1px solid #333;
}

.footer a {
  color: #f0a500;
  text-decoration: none;
}

.footer a:hover {
  text-decoration: underline;
  color: #fff;
}
