/*
 * পাবলিক সাইটের ভেতরের পেজগুলোর (index.php?p=...) একই রকম চেহারা
 *  - .pg-hero : পেজের উপরের শিরোনাম অংশ
 *  - .pg-body : পেজের মূল অংশ (প্রতিটি পেজে আলাদা ক্লাস: .pg-fatwa, .pg-result ...)
 * index.php এই দুটো অংশ তৈরি করে; নতুন পেজ যোগ করতে index.php এর $pg_meta তে এক লাইন।
 */

:root {
  --pg-dark: #0b4a2f;
  --pg-mid: #0f6b42;
  --pg-accent: #f0a500;
  --pg-text: #1f2a24;
  --pg-muted: #6b7a72;
  --pg-line: #e3eae6;
  --pg-bg: #f4f7f5;
}

/* ---------- শিরোনাম অংশ ---------- */
.pg-hero {
  position: relative;
  overflow: hidden;
  padding: 34px 0 30px;
  background: linear-gradient(120deg, var(--pg-mid), var(--pg-dark));
  color: #fff;
}

.pg-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60' viewBox='0 0 60 60'%3E%3Cpath fill='none' stroke='%23fff' stroke-width='1.5' d='M30 2l8 20 20 8-20 8-8 20-8-20-20-8 20-8z'/%3E%3Ccircle cx='30' cy='30' r='6' fill='none' stroke='%23fff' stroke-width='1.5'/%3E%3C/svg%3E");
}

.pg-hero::after {
  content: "";
  position: absolute;
  right: -80px;
  top: -110px;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  border: 46px solid rgba(240, 165, 0, .12);
}

.pg-hero-in {
  position: relative;
  z-index: 1;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 18px;
}

.pg-hero-icon {
  flex-shrink: 0;
  width: 64px;
  height: 64px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .25);
  color: var(--pg-accent);
  font-size: 28px;
  animation: pgIconIn .5s cubic-bezier(.2, 1.4, .4, 1);
}

.pg-crumb {
  font-size: 14px;
  color: rgba(255, 255, 255, .75);
  margin-bottom: 2px;
}

.pg-crumb a {
  color: rgba(255, 255, 255, .9) !important;
}

.pg-crumb a:hover {
  color: var(--pg-accent) !important;
  text-decoration: none;
}

.pg-crumb i {
  margin: 0 6px;
  font-size: 11px;
}

.pg-hero h1 {
  margin: 0;
  font-size: 30px;
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
}

.pg-hero p {
  margin: 4px 0 0;
  font-size: 15px;
  color: rgba(255, 255, 255, .8);
}

@keyframes pgIconIn {
  from {
    transform: scale(.5) rotate(-20deg);
    opacity: 0;
  }
}

/* ---------- মূল অংশ ---------- */
.pg-wrap {
  background: var(--pg-bg);
  padding: 28px 0 56px;
  min-height: 420px;
}

.pg-body {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px;
  animation: pgFade .35s ease;
}

@keyframes pgFade {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

/* পেজের ভেতরের কন্টেইনার যেন আবার বাড়তি ফাঁকা না রাখে */
.pg-body>.container,
.pg-body>.container-fluid {
  max-width: none;
  padding-left: 0;
  padding-right: 0;
}

/* কার্ড */
.pg-body .card {
  border: 1px solid var(--pg-line) !important;
  border-radius: 16px !important;
  box-shadow: 0 6px 22px rgba(11, 74, 47, .07) !important;
  overflow: hidden;
  background: #fff;
}

.pg-body .card-header:not([style*="background"]) {
  background: #fff !important;
  border-bottom: 1px solid var(--pg-line) !important;
  color: var(--pg-text) !important;
}

/* ---------- ট্যাব বাটন (প্রতিটি পেজে আলাদা ক্লাস, তাই এক জায়গায় মিলিয়ে) ---------- */
.pg-fatwa .btn-sm,
.pg-fujala .btn-sm,
.pg-student_login .btn-sm,
.pg-result .btn-custom,
.pg-application_for_admission .tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 3px;
  padding: 9px 20px !important;
  border-radius: 24px !important;
  border: 1.5px solid #cfe0d6 !important;
  background: #fff !important;
  color: var(--pg-dark) !important;
  font-size: 16px !important;
  font-weight: 600;
  box-shadow: none !important;
  transform: none !important;
  transition: background .2s, color .2s, border-color .2s, box-shadow .2s, transform .15s !important;
}

.pg-fatwa .btn-sm:hover,
.pg-fujala .btn-sm:hover,
.pg-student_login .btn-sm:hover,
.pg-result .btn-custom:hover,
.pg-application_for_admission .tab-btn:hover {
  border-color: var(--pg-mid) !important;
  background: #f0f7f3 !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 14px rgba(11, 74, 47, .12) !important;
}

/* নির্বাচিত ট্যাব */
.pg-fatwa .btn-success.btn-sm,
.pg-fujala .btn-success.btn-sm,
.pg-student_login .btn-info.btn-sm,
.pg-result .nav-btn-active,
.pg-application_for_admission .tab-btn.btn-active {
  background: linear-gradient(135deg, var(--pg-mid), var(--pg-dark)) !important;
  border-color: var(--pg-dark) !important;
  color: #fff !important;
  box-shadow: 0 6px 16px rgba(11, 74, 47, .25) !important;
}

/* ---------- টেবিল ---------- */
.pg-body table {
  background: #fff;
}

.pg-body table thead th,
.pg-body table thead td,
.pg-body table tr[style] th {
  background: var(--pg-dark) !important;
  color: #fff !important;
  border-color: rgba(255, 255, 255, .12) !important;
  font-weight: 600;
  vertical-align: middle !important;
}

.pg-body table tbody tr {
  transition: background .15s;
}

.pg-body table tbody tr:hover {
  background: #f1f8f4 !important;
}

.pg-body .table-responsive,
.pg-body .table-wrap {
  border-radius: 12px;
  overflow: auto;
  box-shadow: 0 4px 16px rgba(0, 0, 0, .05);
}

/* ---------- ফর্ম ---------- */
.pg-body .form-control,
.pg-body select.form-control,
.pg-body .custom-select,
.pg-body .form-select {
  min-height: 44px;
  border: 1.5px solid #dbe4df !important;
  border-radius: 10px !important;
  background-color: #fbfdfc;
  transition: border-color .2s, box-shadow .2s;
}

.pg-body .form-control:focus,
.pg-body .custom-select:focus,
.pg-body .form-select:focus {
  border-color: var(--pg-mid) !important;
  background-color: #fff;
  box-shadow: 0 0 0 4px rgba(15, 107, 66, .12) !important;
}

.pg-body .input-group-text {
  border-radius: 10px 0 0 10px !important;
  border: 1.5px solid #dbe4df !important;
  background: #f0f6f2 !important;
  color: var(--pg-mid) !important;
}

/* মূল কাজের বাটন (খোঁজ / প্রিন্ট / জমা) */
.pg-body .btn-primary:not(.btn-sm),
.pg-body .btn-warning:not(.btn-sm),
.pg-body .btn-submit,
.pg-diary .btn-info {
  border: 0 !important;
  border-radius: 12px !important;
  background: linear-gradient(135deg, var(--pg-mid), var(--pg-dark)) !important;
  color: #fff !important;
  font-weight: 600;
  box-shadow: 0 6px 16px rgba(11, 74, 47, .22) !important;
  transition: transform .15s, box-shadow .2s, filter .2s;
}

.pg-body .btn-primary:not(.btn-sm):hover,
.pg-body .btn-warning:not(.btn-sm):hover,
.pg-body .btn-submit:hover,
.pg-diary .btn-info:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
  box-shadow: 0 10px 22px rgba(11, 74, 47, .3) !important;
}

.pg-body .btn-danger:not(.btn-sm) {
  border-radius: 12px !important;
}

/* ---------- কিছু না থাকলে ---------- */
.pg-empty {
  text-align: center;
  padding: 56px 20px;
  background: #fff;
  border: 1px dashed #cfdcd4;
  border-radius: 16px;
  color: var(--pg-muted);
}

.pg-empty i {
  font-size: 46px;
  color: #b9cbc0;
  margin-bottom: 12px;
}

.pg-empty h4 {
  margin: 0 0 6px;
  font-size: 20px;
  color: var(--pg-text);
}

.pg-empty p {
  margin: 0;
}

/* ট্যাবের "প্রথম পাতা" খালি থাকলে যে পরিচিতি দেখায় */
.pg-intro {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.pg-intro a {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px;
  background: #fff;
  border: 1px solid var(--pg-line);
  border-radius: 14px;
  color: var(--pg-text) !important;
  text-decoration: none !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .04);
  transition: transform .2s, box-shadow .2s, border-color .2s;
}

.pg-intro a:hover {
  transform: translateY(-3px);
  border-color: #cfe3d7;
  box-shadow: 0 10px 24px rgba(11, 74, 47, .12);
}

.pg-intro a i {
  width: 50px;
  height: 50px;
  flex-shrink: 0;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #eaf5ef;
  color: var(--pg-mid);
  font-size: 21px;
}

.pg-intro b {
  display: block;
  font-size: 17px;
}

.pg-intro small {
  color: var(--pg-muted);
  font-size: 14px;
}

@media (max-width: 767px) {
  .pg-hero {
    padding: 22px 0 20px;
  }

  .pg-hero-in {
    padding: 0 14px;
    gap: 12px;
  }

  .pg-hero-icon {
    width: 48px;
    height: 48px;
    font-size: 21px;
    border-radius: 12px;
  }

  .pg-hero h1 {
    font-size: 22px;
  }

  .pg-hero p {
    display: none;
  }

  .pg-wrap {
    padding: 18px 0 40px;
  }

  .pg-body {
    padding: 0 12px;
  }

  .pg-fatwa .btn-sm,
  .pg-fujala .btn-sm,
  .pg-student_login .btn-sm,
  .pg-result .btn-custom,
  .pg-application_for_admission .tab-btn {
    padding: 7px 14px !important;
    font-size: 14px !important;
  }
}

/* যেসব পেজের নিজের কোনো কার্ড নেই, সেগুলো সাদা কার্ডের ভেতরে */
.pg-exam_fee_female,
.pg-exam_fee,
.pg-diary {
  background: #fff;
  border: 1px solid var(--pg-line);
  border-radius: 16px;
  box-shadow: 0 6px 22px rgba(11, 74, 47, .07);
  padding: 24px 24px 28px;
}

@media (max-width: 767px) {

  .pg-exam_fee_female,
  .pg-exam_fee,
  .pg-diary {
    margin: 0 10px;
    padding: 16px 12px 20px;
  }
}

/* নিজস্ব রঙিন হেডারের লেখা সাদা */
.pg-body .card-header[style*="background"],
.pg-body .card-header[style*="background"] h1,
.pg-body .card-header[style*="background"] h2,
.pg-body .card-header[style*="background"] h3 {
  color: #fff !important;
}
