/*
 * Custom Site Styles for Regional Real Estate Value System (RTL & Localized)
 * References local Vazirmatn Persian fonts without external network requests
 */

@font-face {
  font-family: 'Vazirmatn';
  src: url('../fonts/Vazirmatn/Vazirmatn-Light.woff2') format('woff2');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Vazirmatn';
  src: url('../fonts/Vazirmatn/Vazirmatn-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Vazirmatn';
  src: url('../fonts/Vazirmatn/Vazirmatn-Medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Vazirmatn';
  src: url('../fonts/Vazirmatn/Vazirmatn-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* Custom CSS Variables */
:root {
  --theme-primary: #0284c7;
  --theme-primary-hover: #0369a1;
  --theme-primary-light: #f0f9ff;
  --theme-dark: #0f172a;
  --theme-gray: #64748b;
  --theme-success: #10b981;
  --theme-success-hover: #059669;
  --theme-success-light: #ecfdf5;
  --theme-border: #e2e8f0;
}

body {
  font-family: 'Vazirmatn' !important;
  direction: rtl;
  text-align: right;
  background-color: #f8fafc;
  color: var(--theme-dark);
  overflow-x: hidden;
}

/* Accent Buttons and States */
.btn-primary {
  background-color: var(--theme-primary) !important;
  border-color: var(--theme-primary) !important;
  color: #ffffff !important;
}
.btn-primary:hover, .btn-primary:focus {
  background-color: var(--theme-primary-hover) !important;
  border-color: var(--theme-primary-hover) !important;
}

.btn-outline-primary {
  color: var(--theme-primary) !important;
  border-color: var(--theme-primary) !important;
}
.btn-outline-primary:hover {
  background-color: var(--theme-primary) !important;
  color: #ffffff !important;
}

.bg-primary-subtle {
  background-color: var(--theme-primary-light) !important;
}
.text-primary {
  color: var(--theme-primary) !important;
}

.btn-success {
  background-color: var(--theme-success) !important;
  border-color: var(--theme-success) !important;
  color: #ffffff !important;
}
.btn-success:hover {
  background-color: var(--theme-success-hover) !important;
  border-color: var(--theme-success-hover) !important;
}

.bg-success-subtle {
  background-color: var(--theme-success-light) !important;
}
.text-success {
  color: var(--theme-success) !important;
}

/* Typography Enhancements */
.fw-black {
  font-weight: 900 !important;
}

.font-weight-black {
  font-weight: 900 !important;
}

/* Custom UI Cards & Elements */
.hover-white:hover {
  color: #ffffff !important;
  transition: color 0.15s ease-in-out;
}

.card-nav {
  transition: all 0.3s ease;
  border: 1px solid var(--theme-border) !important;
}
.card-nav:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.05) !important;
}

/* Custom Scrollbar for premium feel */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Accordion adjustments for RTL */
.accordion-button::after {
  margin-right: auto;
  margin-left: 0 !important;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23212529'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
}

.accordion-button:not(.collapsed)::after {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%230284c7'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
  transform: rotate(-180deg);
}

/* Modal and Backdrop transition helper styles */
.modal-backdrop.show {
  opacity: 0.5;
  background-color: #000;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1040;
}
.modal.show {
  display: block;
  z-index: 1050;
  background: rgba(15, 23, 42, 0.4);
}

/* User custom styles - make p tags in dark statistics section and span tags in footer white */
main section.bg-dark p,
section.bg-dark p,
div#root:nth-of-type(1) > div:nth-of-type(1) > main:nth-of-type(1) > div:nth-of-type(1) > section:nth-of-type(4) > div:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(4) > p:nth-of-type(1) {
  color: #ffffff !important;
}

footer span {
  color: #ffffff !important;
}
