/* Reset & Base Styles */
:root {
  --primary: #1a237e;
  --secondary: #ffc107;
  --dark: #0d153a;
  --light: #f8f9fa;
  --gray: #6c757d;
  --danger: #dc3545;
  --success: #28a745;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}

body {
  background-color: #f5f5f5;
  color: #333;
  line-height: 1.7;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  transition: all 0.3s ease;
}

/* Navbar */
.navbar {
  background-color: var(--dark);
  padding: 0.8rem 2rem;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
}

.brand {
  display: flex;
  align-items: center;
}

.brand-logo {
  height: 50px;
  margin-right: 15px;
}

.brand-text h1 {
  color: white;
  font-size: 1.4rem;
  font-weight: 600;
  line-height: 1.2;
}

.brand-text span {
  color: var(--secondary);
}

.brand-text p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.75rem;
  letter-spacing: 1px;
}

.nav-menu {
  display: flex;
  list-style: none;
}

.nav-item {
  margin-left: 1.8rem;
  position: relative;
}

.nav-link {
  color: white;
  font-weight: 500;
  font-size: 1rem;
  padding: 0.5rem 0;
  display: flex;
  align-items: center;
}

.nav-link:hover {
  color: var(--secondary);
}

.nav-link.active {
  color: var(--secondary);
}

.nav-link.active::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background-color: var(--secondary);
}

.hamburger {
  display: none;
  cursor: pointer;
}

/* Hero Section */
.hero {
  background: linear-gradient(rgba(26, 35, 126, 0.8), rgba(26, 35, 126, 0.8)),
    url("https://files.catbox.moe/bipng4.jpg") no-repeat center center / cover;
  height: 40vh;
  min-height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: white;
  padding: 0 2rem;
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
}

.hero h1 {
  font-size: 2.2rem;
  margin-bottom: 1.5rem;
  line-height: 1.2;
}

.hero h1 span {
  color: var(--secondary);
}

.hero p {
  font-size: 1.1rem;
  margin-bottom: 2rem;
  opacity: 0.9;
}

.btn {
  display: inline-block;
  padding: 0.8rem 2rem;
  border-radius: 50px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  cursor: pointer;
}

.btn-primary {
  background-color: var(--secondary);
  color: var(--dark);
  border: 2px solid var(--secondary);
}

.btn-primary:hover {
  background-color: transparent;
  color: var(--secondary);
}

.btn-secondary {
  background-color: transparent;
  color: var(--secondary);
  border: 2px solid var(--secondary);
}

.btn-secondary:hover {
  background-color: var(--secondary);
  color: var(--dark);
}

/* Form Section */
.container {
  width: 100%;
  max-width: 800px;
  margin: 3rem auto;
  padding: 0 2rem;
}

.form-container {
  background-color: white;
  border-radius: 8px;
  padding: 2.5rem;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
  margin-bottom: 3rem;
}

.section-title {
  text-align: center;
  margin-bottom: 2.5rem;
}

.section-title h2 {
  color: var(--primary);
  font-size: 2rem;
  margin-bottom: 1rem;
  position: relative;
  display: inline-block;
}

.section-title h2::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background-color: var(--secondary);
}

.section-title p {
  color: var(--gray);
  max-width: 700px;
  margin: 0 auto;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--dark);
}

.form-group label.required::after {
  content: " *";
  color: var(--danger);
}

.form-control {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.form-control:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 3px rgba(26, 35, 126, 0.2);
}

select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 16px 12px;
}

.date-input-group {
  display: flex;
  gap: 10px;
}

.date-input-group select,
.date-input-group input {
  flex: 1;
}

.file-input {
  display: flex;
  align-items: center;
}

.file-input label {
  background-color: var(--primary);
  color: white;
  padding: 0.6rem 1.2rem;
  border-radius: 4px;
  cursor: pointer;
  margin-right: 1rem;
  transition: all 0.3s ease;
}

.file-input label:hover {
  background-color: #0d153a;
}

.file-name {
  color: var(--gray);
  font-size: 0.9rem;
}

.btn-group {
  display: flex;
  justify-content: space-between;
  margin-top: 2rem;
}

.btn-group .btn {
  width: 48%;
}

/* Card Styles for Struktur and Berita */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.card {
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.card-image {
  width: 100%;
  height: 200px; /* Fixed height for images */
  object-fit: cover;
  display: block;
}

.card-image.circular {
  border-radius: 50%;
  width: 150px; /* Adjust size for circular image */
  height: 150px; /* Adjust size for circular image */
  object-fit: cover;
  margin: 1.5rem auto 0.5rem auto; /* Center the image */
  border: 4px solid var(--secondary); /* Optional: add a border */
}

.card-content {
  padding: 1.5rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  text-align: center; /* Center content for circular image cards */
}

.card-title {
  font-size: 1.3rem;
  color: var(--primary);
  margin-bottom: 0.75rem;
  line-height: 1.3;
}

.card-subtitle {
  font-size: 0.95rem;
  color: var(--dark);
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.card-text {
  font-size: 0.9rem;
  color: var(--gray);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.card-link {
  display: inline-block;
  color: var(--primary);
  font-weight: 600;
  margin-top: auto; /* Pushes link to bottom */
}

.card-link:hover {
  color: var(--secondary);
}

/* Specific styles for Rayon list */
.rayon-list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  margin-top: 2rem;
}

.rayon-item {
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  padding: 2rem;
  display: flex;
  align-items: center;
  gap: 2rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.rayon-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.rayon-logo {
  width: 100px;
  height: 100px;
  object-fit: contain;
  flex-shrink: 0;
}

.rayon-content h3 {
  font-size: 1.5rem;
  color: var(--primary);
  margin-bottom: 0.75rem;
}

.rayon-content p {
  color: var(--gray);
  line-height: 1.6;
}

@media (max-width: 768px) {
  .rayon-item {
    flex-direction: column;
    text-align: center;
  }
  .rayon-logo {
    margin-bottom: 1rem;
  }
}

/* News detail page */
.news-detail {
  background-color: white;
  border-radius: 8px;
  padding: 2.5rem;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
  margin-bottom: 3rem;
}

.news-detail-image {
  width: 100%;
  max-height: 400px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 2rem;
}

.news-detail h1 {
  font-size: 2.2rem;
  color: var(--primary);
  margin-bottom: 1rem;
}

.news-meta {
  font-size: 0.9rem;
  color: var(--gray);
  margin-bottom: 1.5rem;
}

.news-meta span {
  margin-right: 1rem;
}

.news-content p {
  margin-bottom: 1rem;
  line-height: 1.8;
  color: #444;
}

.back-link {
  display: inline-flex;
  align-items: center;
  margin-top: 2rem;
  color: var(--primary);
  font-weight: 600;
}

.back-link i {
  margin-right: 8px;
}

.back-link:hover {
  color: var(--secondary);
}

/* New sections for index.html */
.info-section {
  background-color: white;
  border-radius: 8px;
  padding: 2.5rem;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
  margin-bottom: 3rem;
  text-align: center;
}

.info-section p {
  max-width: 700px;
  margin: 1rem auto 0;
  color: var(--gray);
}

.values-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
  text-align: center;
}

.value-item {
  background-color: white;
  border-radius: 8px;
  padding: 2rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.value-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.value-item i {
  font-size: 3rem;
  color: var(--primary);
  margin-bottom: 1rem;
}

.value-item h3 {
  font-size: 1.2rem;
  color: var(--dark);
  margin-bottom: 0.75rem;
}

.value-item p {
  font-size: 0.9rem;
  color: var(--gray);
  line-height: 1.6;
}

.cta-section {
  background-color: var(--primary);
  color: white;
  padding: 3rem 2rem;
  border-radius: 8px;
  text-align: center;
  margin-top: 4rem;
  margin-bottom: 3rem;
}

.cta-section h2 {
  color: white;
  font-size: 2rem;
  margin-bottom: 1rem;
}

.cta-section p {
  font-size: 1.1rem;
  margin-bottom: 2rem;
  opacity: 0.9;
}

/* Footer */
.footer {
  background-color: var(--dark);
  color: white;
  padding: 3rem 0 2rem;
  margin-top: 4rem;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.footer-col {
  padding: 0 1rem;
}

.footer-col h3 {
  color: var(--secondary);
  margin-bottom: 1.5rem;
  font-size: 1.2rem;
  position: relative;
  padding-bottom: 10px;
}

.footer-col h3::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 50px;
  height: 2px;
  background-color: var(--secondary);
}

.footer-col p {
  margin-bottom: 0.8rem;
  opacity: 0.9;
  line-height: 1.6;
}

.footer-links {
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.8rem;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.8);
  display: flex;
  align-items: center;
  transition: all 0.3s ease;
}

.footer-links a:hover {
  color: var(--secondary);
  padding-left: 5px;
}

.footer-links a i {
  margin-right: 8px;
  width: 20px;
  text-align: center;
}

.working-hours {
  display: flex;
  gap: 10px;
  margin-bottom: 1rem;
}

.working-hours i {
  color: var(--secondary);
  margin-top: 3px;
}

.working-hours div p:first-child {
  font-weight: 500;
  margin-bottom: 0.2rem;
}

.copyright {
  text-align: center;
  padding-top: 2rem;
  margin-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
  .hamburger {
    display: block;
    color: white;
    font-size: 1.5rem;
  }

  .nav-menu {
    position: fixed;
    top: 70px;
    left: -100%;
    width: 100%;
    height: calc(100vh - 70px);
    background-color: var(--dark);
    flex-direction: column;
    align-items: center;
    padding: 2rem 0;
    transition: all 0.5s ease;
  }

  .nav-menu.active {
    left: 0;
  }

  .nav-item {
    margin: 1rem 0;
  }

  .hero {
    height: 35vh;
  }

  .hero h1 {
    font-size: 1.8rem;
  }

  .hero p {
    font-size: 1rem;
  }

  .form-container {
    padding: 1.5rem;
  }

  .date-input-group {
    flex-direction: column;
    gap: 0.5rem;
  }

  .btn-group {
    flex-direction: column;
  }

  .btn-group .btn {
    width: 100%;
    margin-bottom: 1rem;
  }

  .btn-group .btn:last-child {
    margin-bottom: 0;
  }

  .values-grid {
    grid-template-columns: 1fr; /* Stack items on small screens */
  }

  .info-section,
  .cta-section {
    padding: 2rem 1.5rem;
  }

  .cta-section h2 {
    font-size: 1.8rem;
  }
}

@media (max-width: 576px) {
  .hero {
    height: 40vh;
  }

  .hero h1 {
    font-size: 1.6rem;
  }

  .section-title h2 {
    font-size: 1.5rem;
  }
}
