/* 🌿 Open Donasi - Frontend Style
   Versi sinkron dengan admin panel */

/* --- Font & Global --- */
@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;600&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Open Sans', sans-serif;
}

body {
  background-color: #f8fafc;
  color: #333;
  line-height: 1.6;
  font-size: 14px;
}

/* --- Header --- */
header {
  background-color: #fff;
  border-bottom: 1px solid #e2e8f0;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

header .container {
  width: 90%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 15px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo img { height: 40px; }

nav {
  display: flex;
  gap: 25px;
}

nav a {
  text-decoration: none;
  color: #2c7a7b;
  font-weight: 600;
  transition: color 0.3s;
}

nav a:hover { color: #205f5f; }

/* --- Section Artikel --- */
.section {
  width: 90%;
  max-width: 1100px;
  margin: 50px auto;
}

.section h2 {
  margin-bottom: 20px;
  color: #2c7a7b;
  text-align: center;
  font-size: 1.8em;
}

/* --- Artikel Grid --- */
.articles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
}

.article-card {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  transition: transform 0.3s;
}

.article-card:hover { transform: translateY(-5px); }

.article-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.article-card .content { padding: 15px; }
.article-card h3 { font-size: 1.2em; color: #2c7a7b; margin-bottom: 8px; }
.article-card p { font-size: 0.95em; color: #555; }

/* --- Tombol Global --- */
.btn, .btn-add, .btn-edit, .btn-delete {
  border-radius: 6px;
  padding: 8px 14px;
  font-weight: 600;
  text-decoration: none;
  transition: 0.3s;
}

.btn-add { background: #2c7a7b; color: #fff; }
.btn-add:hover { background: #205f5f; }

.btn-edit { background: #3182ce; color: #fff; }
.btn-edit:hover { background: #2b6cb0; }

.btn-delete { background: #e53e3e; color: #fff; }
.btn-delete:hover { background: #c53030; }

/* --- Tabel Frontend (Responsive) --- */
.table-container {
  width: 100%;
  overflow-x: auto;
  margin-top: 20px;
  border-radius: 8px;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 600px;
  font-size: 14px;
}

.data-table th, .data-table td {
  border: 1px solid #e2e8f0;
  padding: 10px;
  text-align: left;
}

.data-table th {
  background: #2c7a7b;
  color: #fff;
  white-space: nowrap;
}

.data-table tr:nth-child(even) { background: #f7fafc; }
.data-table tr:hover { background: #edf2f7; }

/* --- Footer --- */
footer {
  background: #2c7a7b;
  color: #fff;
  text-align: center;
  padding: 20px 10px;
  margin-top: 50px;
  font-size: 0.9em;
}

/* --- Overlay Donasi Terkumpul --- */
.image-container {
  position: relative;
  overflow: hidden;
}

.image-container img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 8px 8px 0 0;
}

.donasi-overlay {
  position: absolute;
  bottom: 8px;
  left: 8px;
  background: rgba(44, 122, 123, 0.9);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 6px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

@media (max-width: 768px) {
  .donasi-overlay {
    font-size: 11px;
    padding: 4px 7px;
  }
}

.btn-success {
  background-color: #2c7a7b !important;
  border: none;
  color: #fff;
}
.btn-success:hover {
  background-color: #205f5f !important;
}


/* ===========================================================
   🌿 Open Donasi - Responsive Font Adjustments (Mobile View)
   =========================================================== */

@media (max-width: 768px) {
  /* ukuran dasar font seluruh halaman */
  html, body {
    font-size: 12px !important;
  }

  /* header dan navigasi */
  header nav a {
    font-size: 12px !important;
    margin-left: 10px;
  }

  /* judul halaman */
  h1, h2, h3 {
    font-size: 18px !important;
  }

  /* tabel DataTables */
  table.dataTable {
    font-size: 11px !important;
  }

  /* isi tabel (kolom) */
  table.dataTable td,
  table.dataTable th {
    padding: 6px 8px !important;
  }

  /* pagination, search, dan info */
  .dataTables_wrapper .dataTables_filter input,
  .dataTables_wrapper .dataTables_length select,
  .dataTables_wrapper .dataTables_info,
  .dataTables_wrapper .dataTables_paginate {
    font-size: 11px !important;
  }

  /* tombol */
  .btn, .btn-sm {
    font-size: 11px !important;
    padding: 4px 8px !important;
  }

  /* badge status */
  .badge {
    font-size: 10px !important;
    padding: 3px 6px !important;
  }

  /* container utama agar lebih pas */
  .container {
    width: 95% !important;
    padding: 15px !important;
    margin: 20px auto !important;
  }

  /* logo header */
  header img {
    height: 30px !important;
  }
}

@media (max-width: 992px) {
  html, body { font-size: 12px !important; }
  table.dataTable { font-size: 11px !important; }

}
