@font-face {
  font-family: "Vazirmatn";
  src: url('./fonts/Vazirmatn-Light.woff2') format('woff2');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Vazirmatn";
  src: url('./fonts/Vazirmatn-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Vazirmatn";
  src: url('./fonts/Vazirmatn-Medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Vazirmatn";
  src: url('./fonts/Vazirmatn-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root,
[data-bs-theme=light] {
  --pt-main-color: #0067a5;
  --pt-main-color-rgb: 0,103,165;

}


.ptcard-md a, .ptcard-sm a, h5.card-title a, h6 a {
  color: var(--bs-primary-color);
  text-decoration: none;
}
.ptcard-md a:hover, .ptcard-sm a:hover, h5.card-title a:hover, h6 a:hover {
  color: var(--bs-link-color);
  text-decoration: underline;
}

html,
body {
  direction: rtl;
  font-family: "Vazirmatn", system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue","Noto Sans","Liberation Sans",Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";
}

.ltr {
  direction: ltr;
  text-align: left;
}

.text-ptprimary {
    --bs-text-opacity: 1;
    color: rgba(var(--pt-main-color-rgb), var(--bs-text-opacity)) !important;
}

.bg-ptprimary {
    --bs-bg-opacity: 1;
    background-color: rgba(var(--pt-main-color-rgb), var(--bs-bg-opacity)) !important;
}

.persiantools-logo {
	height: 2rem;
	width: 7rem;
}

.fs-xs { font-size: 0.75rem; }
.fs-sm { font-size: 0.875rem; }

#overheader, #footer, #overheader a, #footer a {
  font-size: 0.875rem;
  color: #6ea8fe !important;
}

.search-icon, .theme-icon {
  background: none;
  border: none;
  padding: 0.5rem;
  cursor: pointer;
  font-size: 1.2rem;
  color: var(--bs-secondary);
  transition: color 0.3s ease;
}

.search-icon:hover, .theme-icon:hover {
  color: var(--bs-primary);
}



/* --- TYPE 1 cards: hero-style with overlay --- */
.card.text-bg-dark {
  overflow: hidden;
  border-radius: 0.5rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-img {
  object-fit: cover;
  height: 250px;
  filter: brightness(0.9);
}

.card-img-overlay {
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8), rgba(0,0,0,0.1));
  transition: background 0.3s ease;
}

/* Add vertical divider between columns */
.col.ptcard-sm:not(:last-child) {
  border-left: 1px solid var(--bs-border-color);
}
#sidebar .ptcard-sm:not(:last-child) {
  border-left: none;
}
#sidebar .ptcard-sm:not(:first-child) {
  border-top: 1px solid var(--bs-border-color);
}

/* Ensure divider doesn't appear when columns stack on smaller screens */
@media (max-width: 767.98px) {
  .col.ptcard-sm:not(:last-child) {
    border-left: none;
  }
  .col.ptcard-sm:not(:first-child) {
    border-top: 1px solid var(--bs-border-color);
  }
}

/* Mini card image uniformity */
.ptcard-sm .img-fluid {
  width: 70px;
  height: 70px;
  object-fit: cover;
  border-radius: 0.375rem;
  border: 1px solid rgba(0,0,0,0.08);
}

/* --- Headings and typography --- */
h5.card-title, h6 {
  font-weight: 600;
}

.card-text small {
  color: var(--bs-secondary);
}

/* --- Pagination styling --- */
.pagination {
  margin-top: 3rem;
}

.pagination .page-item a {
  color: var(--bs-primary);
  border-radius: 0.375rem;
  border: 1px solid var(--bs-primary);
  padding: 0.5rem 1rem;
}

.ptcard-md img {
  border-top-left-radius: var(--bs-border-radius) !important;
  border-bottom-left-radius: var(--bs-border-radius) !important;
  border-bottom-right-radius: 0 !important;
  border-top-right-radius: 0 !important;
  width:300px;
  height:200px;
  object-fit:cover;
}

/* --- Responsive tweaks --- */
@media (max-width: 768px) {
  .card.border-0.d-flex {
    flex-direction: column;
  }
  .ptcard-md img {
    width: 100%;
    height: auto;
    margin-bottom: 1rem;
    border-top-right-radius: var(--bs-border-radius) !important;
    border-top-left-radius: var(--bs-border-radius) !important;
    border-bottom-right-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
    margin: auto;
  }
}


.category-list > li.cat-item {
  flex: 0 0 25%; /* 4 columns */
  max-width: 25%;
  list-style: none;
}
.category-list {
  display: flex;
  flex-wrap: wrap;
}
.category-list ul {
  margin-left: 1rem;
  margin-top: 0.5rem;
}


.comment-list .children {
  margin-right: 2rem;
  border-right: 2px solid var(--bs-border-color);
  padding-left: 1rem;
}

.comment-list .children li {
  display: block;
}

.comment a {
  text-decoration: none;
}

article a {
  text-decoration: none;
}

.entry-content img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 2rem auto;
  border-radius: 0.75rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.archive .entry-content img {
    margin: 0.5rem auto;
}