/* Global Styles */
:root {
  --primary-color: #4a6fdc;
  --secondary-color: #6c757d;
  --success-color: #28a745;
  --info-color: #17a2b8;
  --warning-color: #ffc107;
  --danger-color: #dc3545;
  --light-color: #f8f9fa;
  --dark-color: #343a40;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: #333;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1 0 auto;
}

footer {
  margin-top: auto;
}

/* Navigation */
.navbar-brand {
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 0;
}

.navbar-brand img {
  max-height: 40px;
}

/* Navbar profile photo and dropdown alignment */
.navbar .nav-item.dropdown .nav-link {
  min-height: 40px;
  display: flex;
  align-items: center;
  padding: 0.5rem 1rem;
}

.navbar .nav-item.dropdown .nav-link img {
  flex-shrink: 0;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.navbar .nav-item.dropdown .nav-link i {
  flex-shrink: 0;
  vertical-align: middle;
}

/* Ensure consistent navbar height on all devices */
.navbar-nav .nav-item .nav-link {
  display: flex;
  align-items: center;
  padding: 0.5rem 1rem;
}

@media (max-width: 991.98px) {
  .navbar .nav-item.dropdown .nav-link {
    padding: 0.5rem 0;
  }
  
  .navbar-nav .nav-item .nav-link {
    padding: 0.5rem 0;
  }
}

/* Settings tabs active state styling - Maximum specificity to override Bootstrap */
.container .row .col-lg-3 .list-group .list-group-item-action.active,
.container .list-group .list-group-item.list-group-item-action.active,
.container .list-group .list-group-item-action.active,
.list-group-item-action.active {
  background-color: #4a6fdc !important;
  background-image: none !important;
  color: #ffffff !important;
  border-color: #4a6fdc !important;
  font-weight: 500 !important;
  box-shadow: none !important;
}

.container .row .col-lg-3 .list-group .list-group-item-action.active:hover,
.container .row .col-lg-3 .list-group .list-group-item-action.active:focus,
.container .list-group .list-group-item.list-group-item-action.active:hover,
.container .list-group .list-group-item.list-group-item-action.active:focus,
.container .list-group .list-group-item-action.active:hover,
.container .list-group .list-group-item-action.active:focus,
.list-group-item-action.active:hover,
.list-group-item-action.active:focus {
  background-color: #3a5bbf !important;
  background-image: none !important;
  color: #ffffff !important;
  border-color: #3a5bbf !important;
  box-shadow: none !important;
}

.container .row .col-lg-3 .list-group .list-group-item-action.active i,
.container .list-group .list-group-item.list-group-item-action.active i,
.container .list-group .list-group-item-action.active i,
.list-group-item-action.active i {
  color: #ffffff !important;
}

/* Additional specificity for settings page tabs */
[data-bs-toggle="list"].active {
  background-color: #4a6fdc !important;
  color: #ffffff !important;
  border-color: #4a6fdc !important;
}

/* Navbar buttons and language dropdown consistency */
.navbar .nav-item .btn,
.navbar .language-switcher .btn {
  height: 38px;
  display: flex;
  align-items: center;
  padding: 0.375rem 0.75rem;
  font-size: 1rem;
  line-height: 1.5;
}

/* Hero Section */
.hero {
  padding: 4rem 0;
  background: linear-gradient(135deg, var(--primary-color) 0%, #3a5bbf 100%);
}

/* Feature Icons */
.feature-icon {
  width: 60px;
  height: 60px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

/* Steps */
.step {
  padding: 1.5rem;
}

.step-number {
  width: 50px;
  height: 50px;
  background-color: var(--primary-color);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: bold;
  margin: 0 auto 1rem;
}

/* Pricing Cards */
.pricing-card {
  transition: transform 0.3s ease;
}

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

.price {
  font-size: 2.5rem;
  font-weight: 700;
}

.period {
  font-size: 1rem;
  font-weight: normal;
  color: var(--secondary-color);
}

.company-size {
  color: var(--secondary-color);
  border-bottom: 1px solid #eee;
  padding-bottom: 1rem;
}

/* Job Cards */
.job-card {
  transition: transform 0.2s ease;
}

.job-card:hover {
  transform: translateY(-3px);
}

.job-title {
  color: var(--primary-color);
  font-weight: 600;
}

/* Company Logo */
.company-logo {
  max-width: 100%;
  height: auto;
  border-radius: 5px;
}

/* Dashboard */
.dashboard-card {
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  margin-bottom: 1.5rem;
}

.dashboard-card .card-header {
  background-color: var(--primary-color);
  color: white;
  font-weight: 600;
}

.stat-card {
  text-align: center;
  padding: 1.5rem;
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.stat-label {
  color: var(--secondary-color);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Forms */
.form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.25rem rgba(74, 111, 220, 0.25);
}

/* Referral Link */
.referral-link-box {
  background-color: var(--light-color);
  padding: 1rem;
  border-radius: 5px;
  margin-bottom: 1rem;
}

.copy-btn {
  cursor: pointer;
}

/* Leaderboard */
.leaderboard-item {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #eee;
}

.leaderboard-item:last-child {
  border-bottom: none;
}

.leaderboard-rank {
  font-weight: 700;
  width: 30px;
  height: 30px;
  background-color: var(--primary-color);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 1rem;
}

.leaderboard-item.current-user {
  background-color: rgba(74, 111, 220, 0.1);
}

/* Language Switcher */
.language-switcher-hero {
  margin-top: 1.5rem;
}

.language-switcher-hero .btn {
  margin-right: 0.25rem;
  margin-bottom: 0.25rem;
  font-size: 0.85rem;
  border-radius: 20px;
  padding: 0.25rem 0.75rem;
  transition: all 0.2s ease;
  color: white;
}

.language-switcher-hero .btn-outline-light {
  border-color: rgba(255, 255, 255, 0.5);
}

.language-switcher-hero .btn-outline-light:hover {
  background-color: rgba(255, 255, 255, 0.2);
  color: white;
}

.language-switcher-hero .btn-light {
  color: var(--primary-color);
  font-weight: 600;
}

.language-switcher-hero .btn:hover {
  transform: translateY(-2px);
}

/* RTL Support */
html[dir="rtl"] .language-switcher-hero .btn {
  margin-right: 0;
  margin-left: 0.25rem;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .hero {
    padding: 2rem 0;
  }
  
  .price {
    font-size: 2rem;
  }
  
  .stat-number {
    font-size: 2rem;
  }
}

/* Radio buttons and checkboxes positioning for LTR/RTL */
/* For LTR languages, keep radio buttons on the left (default position) */
[dir="ltr"] .form-check {
  display: flex;
  align-items: flex-start;
  text-align: left;
}

[dir="ltr"] .form-check .form-check-input {
  margin-right: 0.5rem;
  margin-left: 0;
  position: static;
  margin-top: 0.125rem;
  flex-shrink: 0;
}

[dir="ltr"] .form-check .form-check-label {
  flex: 1;
  cursor: pointer;
  margin-bottom: 0;
}

[dir="ltr"] .form-check .form-text {
  margin-left: 1.75rem;
  margin-right: 0;
  text-align: left;
}

/* For RTL languages, position radio buttons on the right */
[dir="rtl"] .form-check {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-direction: row-reverse;
  text-align: right;
}

[dir="rtl"] .form-check .form-check-input {
  margin-left: 0.5rem;
  margin-right: 0;
  position: static;
  margin-top: 0.125rem;
  flex-shrink: 0;
}

[dir="rtl"] .form-check .form-check-label {
  flex: 1;
  cursor: pointer;
  margin-bottom: 0;
}

[dir="rtl"] .form-check .form-text {
  margin-right: 1.75rem;
  margin-left: 0;
  text-align: right;
}

/* Modal Header Positioning - X button on correct side for each direction */

/* LTR: X button on the LEFT, title on the RIGHT */
[dir="ltr"] .modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-direction: row-reverse;
}

[dir="ltr"] .modal-header .btn-close {
  order: 1;
  margin: 0;
}

[dir="ltr"] .modal-header .modal-title {
  order: 2;
  margin: 0;
}

/* RTL: X button on the RIGHT, title on the LEFT */
[dir="rtl"] .modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-align: right;
  flex-direction: row;
}

[dir="rtl"] .modal-header .btn-close {
  order: 2;
  margin: 0;
}

[dir="rtl"] .modal-header .modal-title {
  order: 1;
  margin: 0;
  text-align: right;
}

[dir="rtl"] .modal-footer {
  justify-content: flex-start;
}

[dir="rtl"] .modal-footer .btn {
  margin-left: 0;
  margin-right: 0.5rem;
}

[dir="rtl"] .modal-footer .btn:last-child {
  margin-right: 0;
}

/* Additional RTL support for modal content */
[dir="rtl"] .modal-body {
  text-align: right;
}

[dir="rtl"] .modal-body .alert {
  text-align: right;
}

[dir="rtl"] .modal-body .form-label {
  text-align: right;
}

[dir="rtl"] .modal-body .form-control {
  text-align: right;
}

/* Ensure modal content flows correctly in RTL */
[dir="rtl"] .modal-content {
  direction: rtl;
}

/* Fix button positioning in modal footer for RTL */
[dir="rtl"] .modal-footer {
  direction: rtl;
}

/* Ensure close button is properly positioned in RTL */
[dir="rtl"] .btn-close {
  margin-left: 0;
  margin-right: auto;
}

[dir="rtl"] .d-flex {
  direction: rtl;
}

[dir="rtl"] .justify-content-between {
  direction: rtl;
}

[dir="rtl"] .table th,
[dir="rtl"] .table td {
  text-align: right;
}

[dir="rtl"] .alert {
  text-align: right;
} 