/* ============================================
   Primary Color Configuration
   ============================================ */
:root {
  --bs-primary: #da0021;
  --bs-primary-rgb: 218, 0, 33;
  --bs-primary-text-emphasis: #820013;
  --bs-primary-bg-subtle: #fce8ec;
  --bs-primary-border-subtle: #f9ccd5;
  /* Logo Color Palette - Realtor Antalya */
  --logo-dark: #060808;
  --logo-gray: #3b3b3b;
}

/* ============================================
   Global Styles
   ============================================ */
/* 
   Default font for LTR languages (Turkish, English, German)
   Inter font - Professional corporate font for Latin script
   Russian (ru) and RTL languages (Arabic, Persian) have specific font overrides below
*/
* {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem rgba(218, 0, 33, 0.15);
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

/* ============================================
   Bootstrap Primary Color Overrides
   ============================================ */
.btn-primary {
  --bs-btn-bg: #da0021;
  --bs-btn-border-color: #da0021;
  --bs-btn-hover-bg: #b00019;
  --bs-btn-hover-border-color: #b00019;
  --bs-btn-active-bg: #8f0015;
  --bs-btn-active-border-color: #8f0015;
  --bs-btn-disabled-bg: #da0021;
  --bs-btn-disabled-border-color: #da0021;
}

.btn-outline-primary {
  --bs-btn-color: #da0021;
  --bs-btn-border-color: #da0021;
  --bs-btn-hover-bg: #da0021;
  --bs-btn-hover-border-color: #da0021;
  --bs-btn-active-bg: #da0021;
  --bs-btn-active-border-color: #da0021;
}

.bg-primary {
  background-color: #da0021 !important;
}

.text-primary {
  color: #da0021 !important;
}

.border-primary {
  border-color: #da0021 !important;
}

.link-primary {
  color: #da0021 !important;
}

.link-primary:hover,
.link-primary:focus {
  color: #b00019 !important;
}

.alert-primary {
  --bs-alert-color: #820013;
  --bs-alert-bg: #fce8ec;
  --bs-alert-border-color: #f9ccd5;
}

.badge.bg-primary {
  background-color: #da0021 !important;
}

.form-check-input:checked {
  background-color: #da0021;
  border-color: #da0021;
}

.form-control:focus,
.form-select:focus {
  border-color: rgba(218, 0, 33, 0.6);
  box-shadow: 0 0 0 0.25rem rgba(218, 0, 33, 0.15);
}

.nav-pills .nav-link.active,
.nav-pills .show > .nav-link {
  background-color: #da0021;
}

.pagination .page-link {
  color: #da0021;
}

.pagination .page-link:hover {
  color: #b00019;
  background-color: #fce8ec;
  border-color: #f9ccd5;
}

.pagination .page-item.active .page-link {
  background-color: #da0021;
  border-color: #da0021;
}

.progress-bar {
  background-color: #da0021;
}

/* ============================================
   Tailwind-style Utility Classes for Primary Color
   ============================================ */

/* Background Colors */
.bg-primary-50 {
  background-color: #fce8ec !important;
}

.bg-primary-100 {
  background-color: #f9ccd5 !important;
}

.bg-primary-600 {
  background-color: #da0021 !important;
}

.bg-primary-700 {
  background-color: #b00019 !important;
}

.hover\:bg-primary-700:hover {
  background-color: #b00019 !important;
}

/* Text Colors */
.text-primary-500 {
  color: #ff0029 !important;
}

.text-primary-600 {
  color: #da0021 !important;
}

.text-primary-700 {
  color: #b00019 !important;
}

/* Border Colors */
.border-primary-200 {
  border-color: #f9ccd5 !important;
}

.border-primary-500 {
  border-color: #ff0029 !important;
}

.border-primary-600 {
  border-color: #da0021 !important;
}

/* Focus Ring Colors */
.focus\:ring-primary-500:focus {
  --tw-ring-color: rgba(218, 0, 33, 0.5) !important;
}

.focus\:border-primary-500:focus {
  border-color: #da0021 !important;
}

/* Focus Ring Offset */
.focus\:ring-offset-2:focus {
  --tw-ring-offset-width: 2px !important;
}

/* Ring Width */
.focus\:ring-2:focus {
  --tw-ring-width: 2px !important;
  box-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color) !important;
}

/* ============================================
   CRM Checkbox Design (Login-style)
   ============================================ */

/* Checkbox Wrapper */
.crm-checkbox-wrapper {
    display: flex;
    align-items: center;
}

/* Hide native checkbox */
.crm-checkbox {
    display: none;
}

/* Checkbox Label */
.crm-checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
    color: #374151;
    user-select: none;
    font-weight: 500;
}

/* Custom Checkbox Visual */
.crm-checkbox-custom {
    width: 20px;
    height: 20px;
    border: 2px solid #d1d5db;
    border-radius: 4px;
    background: #ffffff;
    position: relative;
    flex-shrink: 0;
    transition: all 0.2s ease-in-out;
}

/* Hover State */
.crm-checkbox-label:hover .crm-checkbox-custom {
    border-color: #da0021;
    background-color: #fce8ec;
}

/* Checked State */
.crm-checkbox:checked + .crm-checkbox-label .crm-checkbox-custom {
    background: #da0021;
    border-color: #da0021;
}

/* Checkmark Icon */
.crm-checkbox:checked + .crm-checkbox-label .crm-checkbox-custom::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #ffffff;
    font-size: 12px;
    font-weight: bold;
    line-height: 1;
}

/* Focus State */
.crm-checkbox:focus + .crm-checkbox-label .crm-checkbox-custom {
    outline: 2px solid rgba(218, 0, 33, 0.5);
    outline-offset: 2px;
}

/* Disabled State */
.crm-checkbox:disabled + .crm-checkbox-label {
    opacity: 0.5;
    cursor: not-allowed;
}

.crm-checkbox:disabled + .crm-checkbox-label .crm-checkbox-custom {
    background-color: #f3f4f6;
    border-color: #d1d5db;
    cursor: not-allowed;
}

/* Checkbox Text */
.crm-checkbox-text {
    color: #374151;
    font-size: 14px;
    font-weight: 500;
}

/* Standard Checkbox and Radio Styles */
input[type="checkbox"].text-primary-600 {
  accent-color: #da0021;
}

input[type="checkbox"].text-primary-600:checked {
  accent-color: #da0021;
}

input[type="checkbox"].focus\:ring-primary-500:focus {
  outline: 2px solid rgba(218, 0, 33, 0.5);
  outline-offset: 2px;
}

/* Radio Button Styles */
input[type="radio"].text-primary-600 {
  accent-color: #da0021;
}

input[type="radio"] {
  cursor: pointer;
  border: none !important;
  outline: none !important;
}

input[type="radio"]:checked {
  border: none !important;
  outline: none !important;
}

input[type="radio"].text-primary-600:checked {
  accent-color: #da0021;
  border: none !important;
  outline: none !important;
}

input[type="radio"].focus\:ring-primary-500:focus {
  outline: 2px solid rgba(218, 0, 33, 0.5) !important;
  outline-offset: 2px;
  border: none !important;
}

/* Quill Editor Styles */
/* Quill custom styles */
.ql-container {
  font-family: inherit;
  font-size: 14px;
  min-height: 200px;
}

.ql-editor {
  min-height: 200px;
}

.ql-toolbar {
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
  border: 2px solid #d1d5db;
  border-bottom: 1px solid #d1d5db;
}

.ql-container {
  border-bottom-left-radius: 8px;
  border-bottom-right-radius: 8px;
  border: 2px solid #d1d5db;
  border-top: none;
}

.ql-toolbar.ql-snow,
.ql-container.ql-snow {
  border-color: #d1d5db;
}

.ql-toolbar.ql-snow:hover,
.ql-container.ql-snow:focus-within {
  border-color: rgba(218, 0, 33, 0.6);
}

.ql-container.ql-snow:focus-within {
  box-shadow: 0 0 0 3px rgba(218, 0, 33, 0.1);
}

/* ============================================
   Additional Tailwind-like Utility Classes
   ============================================ */

/* Hover effects for links and buttons */
.hover\:bg-primary-50:hover {
  background-color: #fce8ec !important;
}

.hover\:text-primary-700:hover {
  color: #b00019 !important;
}

/* Disabled states */
.disabled\:opacity-50:disabled {
  opacity: 0.5 !important;
}

.disabled\:cursor-not-allowed:disabled {
  cursor: not-allowed !important;
}

/* ============================================
   Tile Checkbox/Radio Border Styles
   ============================================ */
/* Removed: Tile styles are no longer used, using standard form controls */

/* ============================================
   Dropdown Chevron Icon - Always Visible
   ============================================ */
/* Ensure chevron icon is always visible in all select elements, even when disabled or empty */
select[class*="appearance-none"] {
  background-image: url('data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 width=%2212%22 height=%2212%22 viewBox=%220 0 12 12%22%3E%3Cpath fill=%22%236b7280%22 d=%22M6 9L1 4h10z%22/%3E%3C/svg%3E') !important;
  background-repeat: no-repeat !important;
  background-position: right 1rem center !important;
  background-size: 12px 12px !important;
}

/* Disabled select - gray chevron but still visible */
select[class*="appearance-none"]:disabled {
  background-image: url('data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 width=%2212%22 height=%2212%22 viewBox=%220 0 12 12%22%3E%3Cpath fill=%22%239ca3af%22 d=%22M6 9L1 4h10z%22/%3E%3C/svg%3E') !important;
  background-repeat: no-repeat !important;
  background-position: right 1rem center !important;
  background-size: 12px 12px !important;
}

/* Transition */
.transition,
.transition-colors {
  transition: all 0.2s ease-in-out;
}

/* ============================================
   Generic Form Elements (Login-style for CRM)
   ============================================ */

.form-group {
  margin-bottom: 24px;
}

.form-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 8px;
}

.form-label .required {
  color: #ef4444;
  margin-left: 2px;
}

.input-wrapper {
  position: relative;
}

.form-control-custom {
  width: 100%;
  padding: 14px 16px 14px 48px;
  font-size: 15px;
  border: 1.5px solid #d1d5db;
  border-radius: 8px;
  background: #ffffff;
  color: #111827;
  font-family: inherit;
  transition: all 0.2s;
}

.form-control-custom:focus {
  outline: none;
  border-color: rgba(218, 0, 33, 0.6);
  box-shadow: 0 0 0 3px rgba(218, 0, 33, 0.1);
}

.form-control-custom::placeholder {
  color: #9ca3af;
}

.form-control-custom:disabled {
  background-color: #f9fafb;
  color: #9ca3af;
  cursor: not-allowed;
  border-color: #e5e7eb;
}

.input-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: #9ca3af;
  font-size: 18px;
  pointer-events: none;
  z-index: 1;
}

.input-wrapper:focus-within .input-icon {
  color: rgba(218, 0, 33, 0.8);
}

/* Select with icon support */
.select-wrapper {
  position: relative;
}

.form-select-custom {
  width: 100%;
  padding: 14px 16px 14px 48px;
  font-size: 15px;
  border: 1.5px solid #d1d5db;
  border-radius: 8px;
  background: #ffffff;
  color: #111827;
  font-family: inherit;
  transition: all 0.2s;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}

.form-select-custom:focus {
  outline: none;
  border-color: rgba(218, 0, 33, 0.6);
  box-shadow: 0 0 0 3px rgba(218, 0, 33, 0.1);
}

.form-select-custom:disabled {
  background-color: #f9fafb;
  color: #9ca3af;
  cursor: not-allowed;
  border-color: #e5e7eb;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%239ca3af' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
}

.select-wrapper:focus-within .input-icon {
  color: rgba(218, 0, 33, 0.8);
}

/* Textarea with icon support */
.form-textarea-custom {
  width: 100%;
  padding: 14px 16px;
  font-size: 15px;
  border: 1.5px solid #d1d5db;
  border-radius: 8px;
  background: #ffffff;
  color: #111827;
  font-family: inherit;
  transition: all 0.2s;
  resize: vertical;
  min-height: 100px;
}

.form-textarea-custom:focus {
  outline: none;
  border-color: rgba(218, 0, 33, 0.6);
  box-shadow: 0 0 0 3px rgba(218, 0, 33, 0.1);
}

.form-textarea-custom::placeholder {
  color: #9ca3af;
}

.form-textarea-custom:disabled {
  background-color: #f9fafb;
  color: #9ca3af;
  cursor: not-allowed;
  border-color: #e5e7eb;
}

/* Validation error styles */
.validation-error {
  display: block;
  margin-top: 6px;
  font-size: 13px;
  color: #ef4444;
}

.field-validation-error {
  display: block;
  margin-top: 6px;
  font-size: 13px;
  color: #ef4444;
}

.form-control-custom.is-invalid,
.form-select-custom.is-invalid,
.form-textarea-custom.is-invalid {
  border-color: #ef4444;
  background: rgba(239, 68, 68, 0.05);
}

.form-control-custom.is-invalid:focus,
.form-select-custom.is-invalid:focus,
.form-textarea-custom.is-invalid:focus {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

/* International Telephone Input compatibility */
.input-wrapper .iti {
  width: 100%;
}

.input-wrapper .iti__flag-container {
  z-index: 2;
}

.input-wrapper .form-control-custom {
  padding-left: 48px;
}

.input-wrapper.has-iti .form-control-custom {
  padding-left: 90px; /* Space for flag + icon */
}

.input-wrapper.has-iti .input-icon {
  left: 60px; /* Adjust icon position when intl-tel-input is active */
}

/* OpenStreetMap Leaflet Styles */
#propertyMap {
  z-index: 0;
}

#propertyMap .leaflet-container {
  font-family: 'Inter', sans-serif;
}

/* ============================================
   Line Clamp Utilities (for text truncation)
   ============================================ */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-4 {
  display: -webkit-box;
  -webkit-line-clamp: 4;
  line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ============================================
   Professional Header & Topbar Styles
   Modern, Clean Design - No Gradients
   Logo Color Palette Integration:
   - Primary: #DA0021 (red)
   - Dark: #060808 (logo text)
   - Gray: #3B3B3B (secondary text)
   ============================================ */

/* Topbar - Minimal & Clean Design */
.topbar {
  background: #ffffff;
  color: #3b3b3b;
  padding: 10px 0;
  font-size: 13px;
  font-weight: 400;
  position: relative;
  z-index: 1000;
  border-bottom: 1px solid #e5e7eb;
}

.topbar-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 2rem;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Topbar User Info - Authenticated Users */
.topbar-user-info {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.topbar-user-greeting {
  color: #3b3b3b;
  font-size: 13px;
  font-weight: 400;
  white-space: nowrap;
}

.topbar-user-greeting strong {
  color: #060808;
  font-weight: 600;
}

.topbar-link-crm {
  font-weight: 600;
  color: #da0021;
}

.topbar-link-crm:hover {
  color: #b00019;
}

.topbar-logout-form {
  display: inline-block;
  margin: 0;
  padding: 0;
}

.topbar-link-logout {
  position: relative;
}

.topbar-btn-spinner {
  display: inline-block;
  animation: spin 0.8s linear infinite;
}

.topbar-btn-spinner i {
  font-size: 13px;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.topbar-link {
  color: #3b3b3b;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: color 0.2s ease;
  font-weight: 400;
  padding: 2px 0;
  font-size: 13px;
}

.topbar-link:hover {
  color: #da0021;
}

.topbar-link i {
  font-size: 13px;
  color: #3b3b3b;
  transition: color 0.2s ease;
}

.topbar-link:hover i {
  color: #da0021;
}

/* Popover Styles */
.topbar-popover-wrapper {
  position: relative;
}

.topbar-popover-trigger {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  padding: 5px 8px;
  color: #3b3b3b;
  font-size: 13px;
  font-weight: 400;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 90px;
  justify-content: space-between;
  font-family: inherit;
}

.topbar-popover-trigger .fi {
  width: 20px;
  height: 15px;
  border-radius: 3px;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 1px 2px rgba(6, 8, 8, 0.1);
}

.topbar-popover-trigger:hover {
  border-color: #d1d5db;
  color: #060808;
}

.topbar-popover-trigger:focus {
  outline: none;
  border-color: #da0021;
  box-shadow: 0 0 0 2px rgba(218, 0, 33, 0.08);
  color: #060808;
}

.topbar-popover-trigger i {
  font-size: 10px;
  transition: transform 0.2s ease;
  opacity: 0.7;
}

.topbar-popover-wrapper:has(.topbar-popover.open) .topbar-popover-trigger {
  border-color: #da0021;
  color: #060808;
}

.topbar-popover-wrapper:has(.topbar-popover.open) .topbar-popover-trigger i {
  transform: rotate(180deg);
}

.topbar-popover {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(6, 8, 8, 0.15), 0 4px 12px rgba(6, 8, 8, 0.1);
  min-width: 320px;
  width: auto;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-12px) scale(0.95);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

/* Currency popover - wider */
#currency-popover {
  min-width: 480px;
  width: auto;
}

/* Login popover opens from left side */
.topbar-left .topbar-popover {
  left: 0;
  right: auto;
}

.topbar-popover.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.topbar-popover-header {
  padding: 16px 20px;
  border-bottom: 1px solid #e5e7eb;
  background: #f9fafb;
  border-radius: 12px 12px 0 0;
}

.topbar-popover-header span {
  font-size: 13px;
  font-weight: 600;
  color: #060808;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.topbar-popover-content {
  padding: 12px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

/* Language popover - 3 columns */
#language-popover .topbar-popover-content {
  grid-template-columns: repeat(3, 1fr);
}

/* Currency popover - 5 columns */
#currency-popover .topbar-popover-content {
  grid-template-columns: repeat(5, 1fr);
}

.topbar-popover-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  color: #060808;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
  position: relative;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  width: 100%;
  justify-content: center;
  text-align: center;
}

.topbar-popover-item:hover {
  background: transparent;
  color: #da0021;
  border-color: #da0021;
}

.topbar-popover-item.active {
  background: #fce8ec;
  color: #da0021;
  font-weight: 600;
  border-color: #da0021;
}

.popover-item-flag {
  width: 24px;
  height: 18px;
  flex-shrink: 0;
  display: inline-block;
  border-radius: 3px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(6, 8, 8, 0.1);
}

.popover-item-flag.fi {
  font-size: 18px;
  line-height: 1;
}

.popover-item-symbol {
  font-size: 18px;
  width: 24px;
  text-align: center;
  flex-shrink: 0;
  font-weight: 600;
}

.popover-item-text {
  font-weight: inherit;
  white-space: nowrap;
}

.popover-item-check {
  color: #da0021;
  font-size: 16px;
  flex-shrink: 0;
  margin-left: auto;
  font-weight: bold;
}

/* Popover Footer - For login button in language selector */
.topbar-popover-footer {
  padding: 12px;
  border-top: 1px solid #e5e7eb;
  background: #f9fafb;
  border-radius: 0 0 12px 12px;
  margin-top: 4px;
  display: block;
  width: 100%;
  box-sizing: border-box;
}

.topbar-popover-login-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px 16px;
  background: #da0021;
  color: #ffffff;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  border-radius: 8px;
  transition: all 0.2s ease;
  border: none;
  cursor: pointer;
}

.topbar-popover-login-btn:hover {
  background: #b00019;
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(218, 0, 33, 0.3);
}

.topbar-popover-login-btn i {
  font-size: 16px;
  flex-shrink: 0;
}

.topbar-popover-login-btn span {
  font-weight: 600;
}

/* Login Popover - Larger size for form */
.topbar-popover-login {
  min-width: 380px;
  max-width: 420px;
}

.topbar-popover-login-form {
  padding: 20px;
}

.login-form-popover {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.login-form-group-popover {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.login-form-label-popover {
  font-size: 13px;
  font-weight: 600;
  color: #374151;
}

.login-input-wrapper-popover {
  position: relative;
  display: flex;
  align-items: center;
}

.login-input-icon-popover {
  position: absolute;
  left: 12px;
  color: #9ca3af;
  font-size: 16px;
  pointer-events: none;
  z-index: 1;
}

.login-form-control-popover {
  width: 100%;
  padding: 12px 12px 12px 40px;
  font-size: 14px;
  border: 1.5px solid #d1d5db;
  border-radius: 8px;
  background: #ffffff;
  color: #111827;
  font-family: inherit;
  transition: all 0.2s;
}

.login-form-control-popover:focus {
  outline: none;
  border-color: #da0021;
  box-shadow: 0 0 0 3px rgba(218, 0, 33, 0.1);
}

.login-form-control-popover::placeholder {
  color: #9ca3af;
}

.login-password-toggle-popover {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  color: #9ca3af;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  transition: color 0.2s;
}

.login-password-toggle-popover:hover {
  color: #374151;
}

.login-options-popover {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
}

.login-checkbox-wrapper-popover {
  display: flex;
  align-items: center;
}

.login-checkbox-popover {
  display: none;
}

.login-checkbox-label-popover {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
  font-weight: 500;
  color: #374151;
}

.login-checkbox-custom-popover {
  width: 18px;
  height: 18px;
  border: 2px solid #d1d5db;
  border-radius: 4px;
  background: #ffffff;
  position: relative;
  flex-shrink: 0;
  transition: all 0.2s ease-in-out;
}

.login-checkbox-popover:checked + .login-checkbox-label-popover .login-checkbox-custom-popover {
  background: #da0021;
  border-color: #da0021;
}

.login-checkbox-popover:checked + .login-checkbox-label-popover .login-checkbox-custom-popover::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #ffffff;
  font-size: 12px;
  font-weight: bold;
  line-height: 1;
}

.login-checkbox-text-popover {
  color: #374151;
  font-size: 13px;
  font-weight: 500;
}

.login-forgot-link-popover {
  color: #da0021;
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: color 0.2s;
}

.login-forgot-link-popover:hover {
  color: #b00019;
  text-decoration: underline;
}

.login-btn-popover {
  width: 100%;
  padding: 12px 20px;
  background: #da0021;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s;
  margin-top: 4px;
}

.login-btn-popover:hover {
  background: #b00019;
}

.login-btn-popover:active {
  transform: translateY(1px);
}

.login-btn-popover i {
  font-size: 16px;
}

.login-btn-spinner {
  display: none;
  animation: spin 0.8s linear infinite;
}

.login-btn-spinner i {
  font-size: 16px;
}

/* Appointment Button - Using btn-login design */
.topbar-appointment-btn {
  background: #da0021;
  color: #ffffff;
  padding: 10px 22px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.2s ease;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.topbar-appointment-btn:hover {
  background: #b00019;
  color: #ffffff;
}

.topbar-appointment-btn i {
  font-size: 14px;
  flex-shrink: 0;
}

.topbar-appointment-btn span {
  font-weight: 600;
}

/* Responsive: Hide text on small screens, show only icon */
@media (max-width: 640px) {
  .topbar-appointment-btn span {
    display: none;
  }
  
  .topbar-appointment-btn {
    padding: 10px 14px;
    min-width: auto;
  }
  
  .topbar-appointment-btn i {
    margin: 0;
  }
}


/* Main Header - Clean & Professional Design */
.main-header {
  background: #ffffff;
  border-bottom: 1px solid #e5e7eb;
  position: relative;
  z-index: 999;
}

.header-nav {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 2rem;
  position: relative;
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}

.header-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.header-logo:hover {
  opacity: 0.85;
}

.header-logo img {
  height: 44px;
  width: auto;
  display: block;
}

/* Desktop Navigation */
.header-nav-links {
  display: flex;
  align-items: center;
  gap: 2.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-link-item {
  position: relative;
}

.nav-link {
  color: #060808;
  text-decoration: none;
  font-weight: 500;
  font-size: 15px;
  padding: 10px 0;
  position: relative;
  transition: color 0.2s ease;
  display: inline-block;
  letter-spacing: -0.01em;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: #da0021;
  transition: width 0.25s ease;
}

.nav-link:hover {
  color: #da0021;
}

.nav-link:hover::after {
  width: 100%;
}

.nav-link.active {
  color: #da0021;
}

.nav-link.active::after {
  width: 100%;
}

/* ============================================
   Mega Menu Styles - Asana.com Inspired
   Professional, Smooth, Full-Featured Design
   ============================================ */

.nav-link-item-mega {
  position: static; /* Allows mega menu to break out of container */
}

/* Visual connection indicator when hovering mega menu trigger */
.nav-link-item-mega:hover .nav-link::after {
  width: 100%;
  background: #da0021;
}

.nav-link-chevron {
  font-size: 11px;
  margin-left: 6px;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-block;
  vertical-align: middle;
  opacity: 0.7;
}

.nav-link-item-mega:hover .nav-link-chevron,
.nav-link-item-mega.active .nav-link-chevron {
  transform: rotate(180deg);
  opacity: 1;
}

/* Mega Menu Container - Asana Style - Seamless with header, no shadow */
.nav-mega-menu {
  position: fixed;
  top: var(--header-total-height, 106px);
  left: 0;
  right: 0;
  width: 100%;
  max-width: 100vw;
  background: #ffffff;
  /* No borders, no shadow - seamless connection with header, appears as single component */
  /* Overlap header border by 1px to create seamless connection */
  margin-top: -1px;
  /* No box-shadow - appears as part of header */
  z-index: 998;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  max-height: 0;
  overflow: hidden;
  transition: opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.2s cubic-bezier(0.4, 0, 0.2, 1),
              max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              visibility 0.2s;
  pointer-events: none;
}

/* Keep mega menu open when hovering over trigger or menu itself - Asana behavior */
.nav-link-item-mega:hover .nav-mega-menu,
.nav-link-item-mega.active .nav-mega-menu,
.nav-mega-menu:hover {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  max-height: 800px; /* Large enough for content */
  pointer-events: auto;
  /* No box-shadow - seamless with header */
}

/* Mega Menu Container - Single column layout for unified services list */
.nav-mega-menu-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 48px 2rem 40px 2rem; /* Generous padding like Asana */
  display: block;
}

/* Mega Menu Section - Each category column */
.nav-mega-menu-section {
  display: flex;
  flex-direction: column;
  gap: 24px; /* Spacing between title and items */
}

/* Section Title - Asana style: bold, uppercase, small, left-aligned */
.nav-mega-menu-title {
  font-size: 12px;
  font-weight: 600;
  color: #6b7280;
  margin: 0;
  padding: 0 0 0 0; /* Left align with container, no icon offset */
  text-transform: uppercase;
  letter-spacing: 0.08em;
  line-height: 1.4;
}

/* Items Container - 4 columns grid */
.nav-mega-menu-items {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  column-gap: 16px; /* Horizontal spacing between columns */
  row-gap: 8px; /* Vertical spacing between rows */
  align-items: start;
}

/* Menu Item - Asana style: clean, hover background */
.nav-mega-menu-item {
  color: #1f2937;
  text-decoration: none;
  font-size: 15px;
  font-weight: 400;
  padding: 10px 12px;
  border-radius: 6px;
  transition: background-color 0.15s cubic-bezier(0.4, 0, 0.2, 1),
              color 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  gap: 12px;
  line-height: 1.5;
  position: relative;
  width: 100%;
  min-width: 0; /* Allow text truncation */
}

.nav-mega-menu-item i {
  font-size: 16px;
  color: #9ca3af;
  flex-shrink: 0;
  width: 20px;
  text-align: center;
  transition: color 0.15s ease;
}

.nav-mega-menu-item span {
  flex: 1;
  color: inherit;
}

/* Hover State - Asana style: subtle background */
.nav-mega-menu-item:hover {
  background-color: #f9fafb;
  color: #da0021;
}

.nav-mega-menu-item:hover i {
  color: #da0021;
}

/* Responsive Design - Asana Style */
@media (max-width: 1200px) {
  .nav-mega-menu-items {
    grid-template-columns: repeat(3, 1fr);
    column-gap: 16px;
    row-gap: 8px;
  }
}

@media (max-width: 992px) {
  .nav-mega-menu-container {
    padding: 40px 2rem 32px 2rem;
  }
  
  .nav-mega-menu-items {
    grid-template-columns: repeat(2, 1fr);
    column-gap: 16px;
    row-gap: 8px;
  }
}

@media (max-width: 1024px) {
  .nav-mega-menu {
    top: var(--header-total-height, 88px);
    position: fixed;
    left: 0;
    right: 0;
    width: 100%;
    max-width: 100%;
  }
  
  .nav-mega-menu-container {
    grid-template-columns: 1fr;
    gap: 32px;
    padding: 32px 1.5rem 28px 1.5rem;
  }
  
  .nav-mega-menu-section {
    gap: 20px;
  }
  
  .nav-mega-menu-title {
    font-size: 11px;
  }
  
  .nav-mega-menu-items {
    grid-template-columns: repeat(2, 1fr);
    column-gap: 12px;
    row-gap: 8px;
  }
  
  .nav-mega-menu-item {
    font-size: 14px;
    padding: 10px 12px;
  }
  
  .nav-mega-menu-item i {
    font-size: 15px;
    width: 18px;
  }
}

/* Header Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.user-greeting {
  color: #3b3b3b;
  font-size: 14px;
  font-weight: 400;
  margin-right: 12px;
}

.user-greeting strong {
  color: #060808;
  font-weight: 600;
}

.btn-login {
  background: #da0021;
  color: #ffffff;
  padding: 10px 22px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.2s ease;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  letter-spacing: -0.01em;
}

.btn-login:hover {
  background: #b00019;
  color: #ffffff;
}

.btn-logout {
  background: #ef4444;
  color: #ffffff;
  padding: 10px 18px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.2s ease;
  border: none;
  cursor: pointer;
  letter-spacing: -0.01em;
}

.btn-logout:hover {
  background: #dc2626;
  color: #ffffff;
}

/* Mobile Menu Button */
.mobile-menu-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 6px;
  background: transparent;
  border: none;
  color: #060808;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0;
}

.mobile-menu-button:hover {
  background: #f3f4f6;
  color: #da0021;
}

.mobile-menu-button i {
  font-size: 22px;
}

/* Mobile Navigation */
.mobile-menu {
  padding: 1rem 0;
  border-top: 1px solid #e5e7eb;
  margin-top: 0;
}

.mobile-nav-links {
  display: flex;
  flex-direction: column;
  gap: 0;
  list-style: none;
  margin: 0;
  padding: 0;
}

.mobile-nav-link {
  color: #060808;
  text-decoration: none;
  font-weight: 500;
  font-size: 15px;
  padding: 12px 0;
  transition: all 0.2s ease;
  display: block;
  border-radius: 0;
  letter-spacing: -0.01em;
}

.mobile-nav-link:hover {
  color: #da0021;
}

.mobile-nav-link.active {
  color: #da0021;
}

.mobile-nav-item-mega {
  position: relative;
}

.mobile-nav-chevron {
  font-size: 12px;
  margin-left: 4px;
  transition: transform 0.2s ease;
}

.mobile-nav-item-mega.active .mobile-nav-chevron {
  transform: rotate(180deg);
}

.mobile-nav-mega {
  list-style: none;
  margin: 0;
  padding: 0;
  padding-left: 20px;
  padding-top: 8px;
}

.mobile-nav-mega li {
  margin: 0;
  padding: 0;
}

.mobile-nav-mega .mobile-nav-link {
  padding: 10px 0;
  font-size: 14px;
  color: var(--logo-gray);
}

.mobile-btn-login {
  margin-top: 0.75rem;
  width: 100%;
  text-align: center;
}

.mobile-btn-login .btn-login {
  width: 100%;
  justify-content: center;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .header-nav-links {
    display: none;
  }
  
  .nav-mega-menu {
    display: none;
  }
  
  .user-greeting {
    display: none;
  }
}

@media (max-width: 768px) {
  .topbar {
    display: none;
  }
  
  .header-container {
    height: 68px;
  }
  
  .header-logo img {
    height: 38px;
  }
  
  .topbar-content,
  .header-nav {
    padding: 0 1rem;
  }
  
  .topbar-left {
    gap: 1rem;
  }
  
  .header-actions {
    gap: 0.5rem;
  }
  
  .btn-login,
  .btn-logout {
    padding: 8px 16px;
    font-size: 13px;
  }
  
  .user-greeting {
    font-size: 13px;
    margin-right: 8px;
  }
  
  .topbar-popover {
    min-width: 280px;
    width: auto;
    right: 0;
  }
  
  #currency-popover {
    min-width: 280px;
    width: auto;
  }
  
  .topbar-popover-content {
    grid-template-columns: 1fr;
    gap: 6px;
  }
  
  /* Language popover - 2 columns on mobile */
  #language-popover .topbar-popover-content {
    grid-template-columns: repeat(2, 1fr);
  }
  
  /* Currency popover - 2 columns on mobile */
  #currency-popover .topbar-popover-content {
    grid-template-columns: repeat(2, 1fr);
  }
  
  #currency-popover {
    min-width: 280px;
    width: auto;
  }
  
  .topbar-popover-trigger {
    min-width: 80px;
    padding: 4px 6px;
    font-size: 12px;
  }
}

@media (min-width: 1025px) {
  .mobile-menu-button {
    display: none;
  }
  
  .mobile-menu {
    display: none !important;
  }
}

/* ============================================
   Hero Slider Styles
   ============================================ */

.hero-section {
  position: relative;
}

.hero-slider {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.hero-slide-image {
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.hero-slide-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom right, rgba(218, 0, 33, 0.7), rgba(176, 0, 26, 0.338), rgba(134, 0, 19, 0.85));
  z-index: 1;
}

/* Swiper Pagination Customization */
.hero-slider-pagination {
  bottom: 30px !important;
  z-index: 10;
}

.hero-slider-pagination .swiper-pagination-bullet {
  width: 12px;
  height: 12px;
  background: rgba(255, 255, 255, 0.5);
  opacity: 1;
  transition: all 0.3s ease;
  margin: 0 6px;
}

.hero-slider-pagination .swiper-pagination-bullet-active {
  background: #ffffff;
  width: 32px;
  border-radius: 6px;
}

/* Swiper Navigation Customization */
.hero-slider-next,
.hero-slider-prev {
  color: #ffffff;
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
  z-index: 10;
}

.hero-slider-next::after,
.hero-slider-prev::after {
  font-size: 20px;
  font-weight: bold;
}

.hero-slider-next:hover,
.hero-slider-prev:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: scale(1.1);
}

.hero-slider-next {
  right: 20px;
}

.hero-slider-prev {
  left: 20px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .hero-slider-next,
  .hero-slider-prev {
    width: 36px;
    height: 36px;
  }
  
  .hero-slider-next::after,
  .hero-slider-prev::after {
    font-size: 16px;
  }
  
  .hero-slider-next {
    right: 10px;
  }
  
  .hero-slider-prev {
    left: 10px;
  }
  
  .hero-slider-pagination {
    bottom: 20px !important;
  }
  
  .hero-slider-pagination .swiper-pagination-bullet {
    width: 10px;
    height: 10px;
    margin: 0 4px;
  }
  
  .hero-slider-pagination .swiper-pagination-bullet-active {
    width: 24px;
  }
}

/* ============================================
   Footer Styles - Matching Header Design
   ============================================ */

.footer-main {
  background: #ffffff;
  border-top: 1px solid #e5e7eb;
  margin-top: 80px;
  padding: 0;
}

.footer-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 60px 2rem 0;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 40px;
  padding-bottom: 40px;
}

@media (min-width: 768px) {
  .footer-content {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .footer-content {
    grid-template-columns: repeat(4, 1fr);
    gap: 48px;
  }
}

.footer-column {
  display: flex;
  flex-direction: column;
}

.footer-logo {
  margin-bottom: 16px;
}

.footer-logo-img {
  height: 40px;
  width: auto;
}

.footer-company-text {
  font-size: 14px;
  color: var(--logo-gray);
  line-height: 1.6;
  margin-bottom: 20px;
  font-weight: 400;
}

.footer-social-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.footer-social-link {
  width: 36px;
  height: 36px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  text-decoration: none;
  color: var(--logo-gray);
  font-size: 16px;
}

.footer-social-link:hover {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(218, 0, 33, 0.2);
}

.footer-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--logo-dark);
  margin-bottom: 20px;
  letter-spacing: -0.01em;
}

.footer-links-single {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-links-single li {
  margin: 0;
  padding: 0;
}

.footer-link {
  color: var(--logo-gray);
  text-decoration: none;
  font-size: 14px;
  font-weight: 400;
  transition: color 0.2s ease;
  display: inline-block;
  line-height: 1.5;
}

.footer-link:hover {
  color: var(--primary-color);
}

.footer-contact-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.footer-contact-icon {
  color: var(--primary-color);
  font-size: 16px;
  margin-top: 2px;
  flex-shrink: 0;
}

.footer-contact-text {
  color: var(--logo-gray);
  font-size: 14px;
  line-height: 1.6;
  font-weight: 400;
}

.footer-bottom {
  border-top: 1px solid #e5e7eb;
  padding: 24px 0 32px;
  margin-top: 40px;
}

.footer-bottom-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
  text-align: center;
}

@media (min-width: 768px) {
  .footer-bottom-content {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

.footer-copyright {
  font-size: 13px;
  color: var(--logo-gray);
  margin: 0;
  font-weight: 400;
}

.footer-bottom-links {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
}

@media (min-width: 768px) {
  .footer-bottom-links {
    justify-content: flex-end;
  }
}

.footer-bottom-link {
  color: var(--logo-gray);
  text-decoration: none;
  font-size: 13px;
  font-weight: 400;
  transition: color 0.2s ease;
}

.footer-bottom-link:hover {
  color: var(--primary-color);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .footer-container {
    padding: 40px 1rem 0;
  }
  
  .footer-content {
    gap: 32px;
    padding-bottom: 32px;
  }
  
  .footer-bottom {
    padding: 20px 0 24px;
    margin-top: 32px;
  }
}

/* ============================================
   RTL (Right-to-Left) Support
   Best Practices 2025: Arabic & Persian Languages
   ============================================ */

/* Base RTL Styles */
[dir="rtl"] {
  direction: rtl;
  text-align: right;
}

[dir="rtl"] body {
  text-align: right;
}

/* ============================================
   Language-Specific Professional Corporate Font Families - Best Practices 2025
   Note: LTR languages (tr, en, de) use Inter as defined in global * selector above
   Russian, Arabic, and Persian have specific professional corporate font overrides
   ============================================ */

/* Russian (ru) - PT Sans font (professional corporate font optimized for Cyrillic script) */
[lang="ru"] {
  font-family: 'PT Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* Arabic (ar) - Cairo font (professional corporate font optimized for Arabic script and RTL layout) */
[dir="rtl"][lang="ar"] {
  font-family: 'Cairo', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* Persian/Farsi (fa) - Vazirmatn font (professional corporate font optimized for Persian script and RTL layout) */
[dir="rtl"][lang="fa"] {
  font-family: 'Vazirmatn', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* Topbar RTL */
[dir="rtl"] .topbar-content {
  flex-direction: row-reverse;
}

[dir="rtl"] .topbar-left {
  flex-direction: row-reverse;
}

[dir="rtl"] .topbar-right {
  flex-direction: row-reverse;
}

/* Header Container RTL */
[dir="rtl"] .header-container {
  flex-direction: row-reverse;
}

[dir="rtl"] .header-nav-links {
  flex-direction: row-reverse;
}

[dir="rtl"] .header-actions {
  flex-direction: row-reverse;
}

/* Navigation Links RTL */
[dir="rtl"] .nav-link::after {
  left: auto;
  right: 0;
}

[dir="rtl"] .nav-link-chevron {
  margin-left: 0;
  margin-right: 6px;
  transform: scaleX(-1); /* Flip chevron for RTL */
}

[dir="rtl"] .nav-link-item-mega:hover .nav-link-chevron,
[dir="rtl"] .nav-link-item-mega.active .nav-link-chevron {
  transform: scaleX(-1) rotate(180deg);
}

/* User Greeting RTL */
[dir="rtl"] .user-greeting {
  margin-right: 0;
  margin-left: 12px;
}

/* Popover RTL */
[dir="rtl"] .topbar-popover {
  left: auto;
  right: 0;
}

[dir="rtl"] .topbar-popover-content {
  text-align: right;
}

[dir="rtl"] .topbar-popover-item {
  flex-direction: row-reverse;
  text-align: center; /* Keep center alignment in grid */
}

[dir="rtl"] .popover-item-check {
  margin-left: 0;
  margin-right: auto;
}

/* Login Popover RTL */
[dir="rtl"] .topbar-popover-login {
  left: auto;
  right: 0;
}

[dir="rtl"] .login-input-icon-popover {
  left: auto;
  right: 12px;
}

[dir="rtl"] .login-form-control-popover {
  padding: 12px 40px 12px 12px;
}

[dir="rtl"] .login-password-toggle-popover {
  right: auto;
  left: 12px;
}

[dir="rtl"] .login-options-popover {
  flex-direction: row-reverse;
}

/* Mega Menu RTL */
[dir="rtl"] .nav-mega-menu {
  left: auto;
  right: 0;
}

[dir="rtl"] .nav-mega-menu-container {
  text-align: right;
}

[dir="rtl"] .nav-mega-menu-item {
  flex-direction: row-reverse;
  text-align: right;
}

[dir="rtl"] .nav-mega-menu-item i {
  margin-right: 0;
  margin-left: 10px;
}

/* Mobile Menu RTL */
[dir="rtl"] .mobile-nav-links {
  text-align: right;
}

[dir="rtl"] .mobile-nav-link {
  text-align: right;
}

[dir="rtl"] .mobile-nav-chevron {
  margin-left: 0;
  margin-right: auto;
  float: left;
}

/* Footer RTL */
[dir="rtl"] .footer-content {
  text-align: right;
}

[dir="rtl"] .footer-links-single,
[dir="rtl"] .footer-contact-list {
  text-align: right;
}

[dir="rtl"] .footer-contact-item {
  flex-direction: row-reverse;
}

[dir="rtl"] .footer-contact-icon {
  margin-right: 0;
  margin-left: 12px;
}

[dir="rtl"] .footer-bottom-content {
  flex-direction: row-reverse;
}

[dir="rtl"] .footer-bottom-links {
  flex-direction: row-reverse;
}

/* Form Elements RTL */
[dir="rtl"] .input-icon {
  left: auto;
  right: 16px;
}

[dir="rtl"] .input-wrapper .form-control-custom {
  padding-left: 16px;
  padding-right: 48px;
}

[dir="rtl"] .input-wrapper.has-iti .form-control-custom {
  padding-left: 16px;
  padding-right: 90px;
}

[dir="rtl"] .input-wrapper.has-iti .input-icon {
  left: auto;
  right: 60px;
}

/* Select Dropdown Arrow RTL */
[dir="rtl"] select[class*="appearance-none"] {
  background-position: left 1rem center !important;
}

[dir="rtl"] select[class*="appearance-none"]:disabled {
  background-position: left 1rem center !important;
}

/* Button Icon Alignment RTL */
[dir="rtl"] .btn-login i,
[dir="rtl"] .btn-logout i,
[dir="rtl"] .topbar-popover-login-btn i,
[dir="rtl"] .topbar-appointment-btn i {
  order: 2;
}

[dir="rtl"] .btn-login span,
[dir="rtl"] .topbar-popover-login-btn span,
[dir="rtl"] .topbar-appointment-btn span {
  order: 1;
}

/* Swiper Navigation RTL */
[dir="rtl"] .hero-slider-next {
  left: 20px;
  right: auto;
}

[dir="rtl"] .hero-slider-prev {
  right: 20px;
  left: auto;
}

/* Text Alignment RTL - Override for specific cases */
[dir="rtl"] .text-left {
  text-align: right !important;
}

[dir="rtl"] .text-right {
  text-align: left !important;
}

/* Flex Direction RTL - Override for specific cases */
[dir="rtl"] .flex-row {
  flex-direction: row-reverse;
}

/* Margin/Padding Utilities RTL */
[dir="rtl"] .ml-auto {
  margin-left: 0 !important;
  margin-right: auto !important;
}

[dir="rtl"] .mr-auto {
  margin-right: 0 !important;
  margin-left: auto !important;
}

[dir="rtl"] .float-left {
  float: right !important;
}

[dir="rtl"] .float-right {
  float: left !important;
}

/* Responsive RTL Adjustments */
@media (max-width: 768px) {
  [dir="rtl"] .topbar-popover {
    left: auto;
    right: 0;
  }
  
  [dir="rtl"] .user-greeting {
    margin-left: 8px;
    margin-right: 0;
  }
}
