@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600&display=swap');

html, body {
  height: 100%;
  margin: 0;
  font-family: 'Poppins', sans-serif;
  background-color: #ffffff;
  color: #333;
}

body {
  display: flex;
  flex-direction: column;
}

.wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main {
  flex: 1;
}

header {
  background-color: #8a2be2;
  color: white;
  padding: 1.5rem 0;
}

header .container {
  display: flex;
  align-items: center;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.logo {
  display: flex;
  align-items: center;
}

.logo img {
  height: 50px;
  width: auto;
  display: block;
}

.menu-toggle {
  display: none;
  font-size: 24px;
  background: none;
  border: none;
  color: white;
  cursor: pointer;
}

.menu-buttons {
  display: flex;
  gap: 1rem;
  margin-left: auto;
}

.menu-buttons a {
  background-color: white;
  color: #8a2be2;
  padding: 8px 16px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: 600;
  transition: background-color 0.3s, color 0.3s;
}

.menu-buttons a.active {
  background-color: rgba(255, 255, 255, 0.3);
  color: white;
}

.menu-buttons a:hover {
  background-color: #e0c7ff;
}

.hero {
  padding: 3rem 0;
  text-align: center;
}

.hero-content {
  text-align: center;
}

.logo-floating {
  text-align: center;
  margin-bottom: 20px;
  animation: float 3s ease-in-out infinite;
}

.logo-floating img {
  width: 230px;
  height: auto;
  filter: drop-shadow(0 0 15px rgba(138, 43, 226, 0.6));
}

@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-15px);
  }
}

form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

input[type="text"],
input[type="email"],
textarea {
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-family: 'Poppins', sans-serif;
}

footer {
  text-align: center;
  padding: 1rem;
  background-color: #f4f4f4;
  font-size: 0.9rem;
}

.btn,
button.btn {
  background-color: #8a2be2;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 5px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.3s;
}

.btn:hover,
button.btn:hover {
  background-color: #7322c3;
}

@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }

  .menu-buttons {
    width: 100%;
    flex-direction: column;
    gap: 10px;
    display: none;
    margin-top: 1rem;
  }

  .menu-buttons.show {
    display: flex;
  }
}

.artikel-list,
.berita-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.artikel-item-link,
.berita-item-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.artikel-item-link:hover .artikel-item,
.berita-item-link:hover .berita-item {
  transform: translateY(-2px);
}

.artikel-item,
.berita-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border: 1px solid #eee;
  border-radius: 5px;
  padding: 10px;
  background: #fff;
  transition: transform 0.2s;
}

.artikel-item img,
.berita-item img {
  width: 100px;
  height: 70px;
  object-fit: cover;
  border-radius: 5px;
}

.artikel-info h4,
.berita-info h4 {
  font-size: 0.95rem;
  margin: 0;
}

.artikel-grid,
.berita-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  justify-content: start;
}

.artikel-card-link,
.berita-card-link {
  text-decoration: none;
  color: inherit;
}

.artikel-card,
.berita-card {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.3s, box-shadow 0.3s;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  max-width: 300px;
  margin: 0 auto;
}

.artikel-card img,
.berita-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
  transition: transform 0.3s;
}

.artikel-card:hover img,
.berita-card:hover img {
  transform: scale(1.05);
}

.artikel-card:hover,
.berita-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

.artikel-overlay,
.berita-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  background: rgba(0,0,0,0.5);
  color: #fff;
  padding: 8px;
  text-align: center;
}

.artikel-overlay h4,
.berita-overlay h4 {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.2;
}

.login-card {
  background: #fff;
  padding: 2rem;
  border-radius: 10px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.1);
  max-width: 400px;
  margin: 50px auto;
}

.login-card h2 {
  text-align: center;
  margin-bottom: 1.5rem;
  color: #333;
}

.login-card form div {
  margin-bottom: 1rem;
}

.login-card label {
  display: block;
  margin-bottom: 0.5rem;
  color: #555;
  font-weight: 600;
}

.login-card input {
  width: 100%;
  padding: 0.7rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-family: 'Poppins', sans-serif;
}

.login-card input:focus {
  border-color: #8a2be2;
  outline: none;
}

.login-card button {
  width: 100%;
  padding: 0.8rem;
  background: #8a2be2;
  border: none;
  border-radius: 6px;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s;
}

.login-card button:hover {
  background: #7322c3;
}

.login-card .register {
  text-align: center;
  margin-top: 1rem;
  font-size: 0.9rem;
  color: #555;
}

.login-card .register a {
  color: #8a2be2;
  text-decoration: none;
}

.login-card .register a:hover {
  text-decoration: underline;
}

.login-card .errors {
  margin-bottom: 1rem;
  list-style: none;
  padding-left: 0;
}

.login-card .errors li {
  color: #d9534f;
  font-size: 0.9rem;
}
