/* 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;
  min-height: 100vh;
}

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

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Navbar */
.navbar {
  background-color: var(--dark);
  padding: 0.8rem 1rem;
  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;
  width: 100%;
}

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

.brand-logo {
  height: 40px;
  width: auto;
  margin-right: 12px;
}

.brand-text h1 {
  color: white;
  font-size: 1.2rem;
  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.7rem;
  letter-spacing: 0.5px;
}

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

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

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

.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;
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
}

/* 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;
  min-height: 300px;
  height: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: white;
  padding: 3rem 1rem;
}

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

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

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

.hero p {
  font-size: 1rem;
  margin-bottom: 1.8rem;
  opacity: 0.9;
  line-height: 1.6;
}

.btn {
  display: inline-block;
  padding: 0.7rem 1.5rem;
  border-radius: 50px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 0.85rem;
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
  text-align: center;
}

.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: 2rem auto;
  padding: 0 1rem;
}

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

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

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

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

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

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

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

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

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

.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: 14px 10px;
  padding-right: 2.5rem;
}

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

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

.file-input {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

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

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

.file-name {
  color: var(--gray);
  font-size: 0.85rem;
  word-break: break-all;
}

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

.btn-group .btn {
  width: 48%;
  min-width: 120px;
}

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

.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;
  height: 100%;
}

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

.card-image {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
}

.card-image.circular {
  border-radius: 50%;
  width: 120px;
  height: 120px;
  object-fit: cover;
  margin: 1.5rem auto 0.5rem auto;
  border: 3px solid var(--secondary);
}

.card-content {
  padding: 1.2rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  text-align: center;
}

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

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

.card-text {
  font-size: 0.85rem;
  color: var(--gray);
  line-height: 1.5;
  margin-bottom: 1rem;
  flex-grow: 1;
}

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

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

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

.rayon-item {
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  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: 80px;
  height: 80px;
  object-fit: contain;
  flex-shrink: 0;
}

/* Styles untuk halaman detail rayon */
.rayon-detail {
  padding: 2rem 0;
}

.rayon-header {
  display: flex;
  align-items: center;
  gap: 2rem;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
}

.rayon-header img {
  width: 160px;
  height: 160px;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.rayon-info {
  flex: 1;
  min-width: 280px;
}

.rayon-info h1 {
  color: #2c3e50;
  margin-bottom: 5px;
  font-size: 2rem;
}

.rayon-info .subtitle {
  color: #3498db;
  font-size: 1.1rem;
  margin-bottom: 1.2rem;
  font-weight: 600;
}

.instagram-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(45deg, #405de6, #5851db, #833ab4, #c13584, #e1306c, #fd1d1d);
  color: white;
  padding: 8px 16px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 500;
  margin-top: 1rem;
  transition: transform 0.3s ease;
  font-size: 0.9rem;
}

.instagram-link:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.buttons-container {
  display: flex;
  gap: 12px;
  margin: 2rem 0;
  flex-wrap: wrap;
}

.rayon-button {
  padding: 10px 20px;
  background: #3498db;
  color: white;
  border: none;
  border-radius: 5px;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
}

.rayon-button:hover {
  background: #2980b9;
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.rayon-button.secondary {
  background: #2ecc71;
}

.rayon-button.secondary:hover {
  background: #27ae60;
}

.rayon-details-section {
  background: #f8f9fa;
  padding: 1.5rem;
  border-radius: 8px;
  margin-top: 2.5rem;
}

.details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}

.detail-item {
  background: white;
  padding: 1rem;
  border-radius: 5px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.detail-item strong {
  display: block;
  color: #2c3e50;
  margin-bottom: 0.3rem;
  font-size: 0.9rem;
}

.visi-misi {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.visi,
.misi {
  background: white;
  padding: 1.5rem;
  border-radius: 5px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.visi h3,
.misi h3 {
  color: #2c3e50;
  margin-bottom: 1rem;
  padding-bottom: 8px;
  border-bottom: 2px solid #3498db;
  font-size: 1.2rem;
}

.misi ul {
  padding-left: 1.2rem;
}

.misi li {
  margin-bottom: 0.6rem;
  color: #555;
  line-height: 1.5;
}

.error-message {
  text-align: center;
  padding: 3rem 1rem;
}

.back-button {
  display: inline-block;
  margin-top: 1.5rem;
  padding: 0.8rem 1.5rem;
  background: #3498db;
  color: white;
  text-decoration: none;
  border-radius: 5px;
  transition: background 0.3s ease;
  font-size: 0.9rem;
}

.back-button:hover {
  background: #2980b9;
}

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

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

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

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

.news-detail h1 {
  font-size: 1.8rem;
  color: var(--primary);
  margin-bottom: 0.8rem;
  line-height: 1.3;
}

.news-meta {
  font-size: 0.85rem;
  color: var(--gray);
  margin-bottom: 1.2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

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

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

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

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

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

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

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

.value-item {
  background-color: white;
  border-radius: 8px;
  padding: 1.5rem;
  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: 2.5rem;
  color: var(--primary);
  margin-bottom: 0.8rem;
}

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

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

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

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

.cta-section p {
  font-size: 1rem;
  margin-bottom: 1.8rem;
  opacity: 0.9;
  line-height: 1.6;
}

/* Footer */
.footer {
  background-color: var(--dark);
  color: white;
  padding: 2.5rem 0 1.5rem;
  margin-top: 3.5rem;
}

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

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

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

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

.footer-col p {
  margin-bottom: 0.6rem;
  opacity: 0.9;
  line-height: 1.5;
  font-size: 0.9rem;
}

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

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

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

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

.footer-links a i {
  margin-right: 6px;
  width: 18px;
  text-align: center;
  font-size: 0.9rem;
}

.working-hours {
  display: flex;
  gap: 8px;
  margin-bottom: 0.8rem;
}

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

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

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

/* Responsive */
@media (max-width: 992px) {
  .hero h1 {
    font-size: 1.6rem;
  }
  
  .section-title h2 {
    font-size: 1.5rem;
  }
  
  .rayon-header img {
    width: 140px;
    height: 140px;
  }
  
  .rayon-info h1 {
    font-size: 1.8rem;
  }
}

@media (max-width: 768px) {
  .hamburger {
    display: block;
  }
  
  .nav-menu {
    position: fixed;
    top: 60px;
    left: -100%;
    width: 100%;
    height: calc(100vh - 60px);
    background-color: var(--dark);
    flex-direction: column;
    align-items: center;
    padding: 1.5rem 0;
    transition: all 0.5s ease;
    overflow-y: auto;
  }
  
  .nav-menu.active {
    left: 0;
  }
  
  .nav-item {
    margin: 0.8rem 0;
    width: 100%;
    text-align: center;
  }
  
  .nav-link {
    justify-content: center;
    padding: 0.8rem;
  }
  
  .nav-link.active::after {
    width: 50%;
    left: 25%;
  }
  
  .hero {
    padding: 2rem 1rem;
    min-height: 250px;
  }
  
  .hero h1 {
    font-size: 1.5rem;
  }
  
  .hero p {
    font-size: 0.95rem;
  }
  
  .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: 0.8rem;
  }
  
  .btn-group .btn:last-child {
    margin-bottom: 0;
  }
  
  .card-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.2rem;
  }
  
  .rayon-item {
    flex-direction: column;
    text-align: center;
    padding: 1.2rem;
  }
  
  .rayon-logo {
    margin-bottom: 1rem;
  }
  
  .rayon-header {
    flex-direction: column;
    text-align: center;
    gap: 1.5rem;
  }
  
  .rayon-header img {
    width: 150px;
    height: 150px;
  }
  
  .rayon-info {
    min-width: 100%;
  }
  
  .details-grid {
    grid-template-columns: 1fr;
  }
  
  .visi-misi {
    grid-template-columns: 1fr;
  }
  
  .news-detail {
    padding: 1.5rem;
  }
  
  .news-detail h1 {
    font-size: 1.6rem;
  }
  
  .values-grid {
    grid-template-columns: 1fr;
  }
  
  .info-section, .cta-section {
    padding: 1.5rem 1rem;
  }
  
  .cta-section h2 {
    font-size: 1.5rem;
  }
  
  .footer-container {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }
}

@media (max-width: 576px) {
  .navbar {
    padding: 0.6rem 0.8rem;
  }
  
  .brand-logo {
    height: 35px;
    margin-right: 8px;
  }
  
  .brand-text h1 {
    font-size: 1.1rem;
  }
  
  .brand-text p {
    font-size: 0.65rem;
  }
  
  .hero {
    min-height: 220px;
    padding: 1.5rem 1rem;
  }
  
  .hero h1 {
    font-size: 1.4rem;
  }
  
  .hero p {
    font-size: 0.9rem;
  }
  
  .btn {
    padding: 0.6rem 1.2rem;
    font-size: 0.8rem;
  }
  
  .container {
    padding: 0 0.8rem;
  }
  
  .form-container {
    padding: 1.2rem;
  }
  
  .section-title h2 {
    font-size: 1.3rem;
  }
  
  .card-grid {
    grid-template-columns: 1fr;
  }
  
  .file-input {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .file-input label {
    width: 100%;
    text-align: center;
  }
  
  .buttons-container {
    flex-direction: column;
  }
  
  .rayon-button {
    width: 100%;
    text-align: center;
  }
  
  .footer-container {
    grid-template-columns: 1fr;
    gap: 1.2rem;
  }
  
  .footer-col {
    padding: 0;
  }
}
