/* ===== CSS Variables ===== */
:root {
  --primary: #0369a1;
  --primary-dark: #075985;
  --primary-light: #38bdf8;
  --secondary: #475569;
  --accent: #0891b2;
  --success: #15803d;
  --warning: #b45309;
  --error: #b91c1c;

  --background: #ffffff;
  --foreground: #0f172a;
  --muted: #f1f5f9;
  --muted-foreground: #475569;
  --card: #ffffff;
  --card-foreground: #0f172a;
  --border: #e2e8f0;

  --navy: #1e3a5f;
  --navy-light: #2d4a6f;
  --sky: #e0f2fe;
  --sky-light: #f0f9ff;

  --font-arabic: 'Cairo', sans-serif;
  --font-english: 'Poppins', sans-serif;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);

  --radius: 0.75rem;
  --radius-lg: 1rem;
  --radius-full: 9999px;
}

/* ===== Reset & Base ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-arabic);
  background-color: var(--background);
  color: var(--foreground);
  line-height: 1.6;
  direction: inherit;
  text-align: inherit;
}

[dir="rtl"] body,
[dir="rtl"] {
  direction: rtl;
  text-align: right;
}

[dir="ltr"] body,
[dir="ltr"] {
  direction: ltr !important;
  text-align: left !important;
  font-family: var(--font-english);
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-family: var(--font-arabic);
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}

.btn-outline:hover {
  background: var(--primary);
  color: white;
}

.btn-hero {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white;
  padding: 1rem 2rem;
  font-size: 1.125rem;
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 30px -10px rgba(14, 165, 233, 0.5);
}

.btn-hero:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 40px -10px rgba(14, 165, 233, 0.6);
}

.btn-hero-outline {
  background: rgba(255, 255, 255, 0.1);
  color: var(--navy);
  border: 2px solid var(--navy);
  padding: 1rem 2rem;
  font-size: 1.125rem;
  border-radius: var(--radius-lg);
}

.btn-hero-outline:hover {
  background: var(--navy);
  color: white;
}

.btn-accent {
  background: linear-gradient(135deg, var(--accent), var(--primary));
  color: white;
}

.btn-full {
  width: 100%;
}

/* ===== Header ===== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--navy);
}

.logo i {
  color: var(--primary);
  font-size: 1.75rem;
}

.nav-desktop {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-desktop a {
  font-weight: 500;
  color: var(--foreground);
  transition: color 0.3s;
}

.nav-desktop a:hover {
  color: var(--primary);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--foreground);
  cursor: pointer;
}

.mobile-menu {
  display: none;
  position: absolute;
  top: 80px;
  left: 0;
  right: 0;
  background: white;
  padding: 1.5rem;
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
}

.mobile-menu.active {
  display: block;
}

.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.mobile-nav a {
  padding: 0.75rem;
  font-weight: 500;
  border-radius: var(--radius);
  transition: background 0.3s;
}

.mobile-nav a:hover {
  background: var(--muted);
}

.mobile-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

@media (max-width: 768px) {

  .nav-desktop,
  .header-actions {
    display: none;
  }

  .mobile-menu-btn {
    display: block;
  }
}

/* ===== Hero Section ===== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 120px 0 80px;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--sky-light) 0%, var(--sky) 50%, rgba(14, 165, 233, 0.1) 100%);
  z-index: -1;
}

.hero-bg::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -30%;
  width: 80%;
  height: 80%;
  background: radial-gradient(circle, rgba(14, 165, 233, 0.15) 0%, transparent 70%);
  border-radius: 50%;
}

[dir="ltr"] .hero-bg::before {
  right: auto;
  left: -30%;
}

.hero-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.1), rgba(6, 182, 212, 0.1));
  color: var(--primary);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(14, 165, 233, 0.2);
}

.hero-badge i {
  color: var(--warning);
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1.5rem;
  color: var(--navy);
}

.gradient-text {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-description {
  font-size: 1.25rem;
  color: var(--muted-foreground);
  margin-bottom: 2rem;
  line-height: 1.8;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  margin-bottom: 3rem;
  flex-wrap: wrap;
}

.hero-stats {
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 1.5rem 2rem;
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.hero-stat {
  text-align: center;
}

.hero-stat-number {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--primary);
  font-family: var(--font-english);
}

.hero-stat-label {
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

.hero-stat-divider {
  width: 1px;
  height: 40px;
  background: var(--border);
}

/* Hero Visual */
.hero-visual {
  position: relative;
  height: 500px;
}

.hero-card {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  padding: 1.5rem;
}

.hero-card-main {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 320px;
}

.hero-card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  color: var(--primary);
  font-weight: 600;
}

.hero-card-header i {
  font-size: 1.25rem;
}

.hero-card-stats {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.hero-card-stat {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem;
  background: var(--muted);
  border-radius: var(--radius);
}

.hero-card-stat .label {
  color: var(--muted-foreground);
  font-size: 0.875rem;
}

.hero-card-stat .value {
  font-weight: 700;
  font-family: var(--font-english);
}

.hero-card-stat .value.success {
  color: var(--success);
}

.hero-card-stat .value.rating {
  color: var(--warning);
}

.hero-card-float {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  animation: float 3s ease-in-out infinite;
}

.hero-card-verified {
  top: 10%;
  right: 10%;
  animation-delay: 0s;
}

[dir="ltr"] .hero-card-verified {
  right: auto;
  left: 10%;
}

.hero-card-payment {
  bottom: 15%;
  left: 5%;
  animation-delay: 1.5s;
}

[dir="ltr"] .hero-card-payment {
  left: auto;
  right: 5%;
}

.verified-badge i {
  font-size: 2rem;
  color: var(--success);
}

.verified-text .title,
.payment-text .title {
  display: block;
  font-weight: 600;
  color: var(--foreground);
}

.verified-text .subtitle,
.payment-text .subtitle {
  display: block;
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

.hero-card-payment i {
  font-size: 1.5rem;
  color: var(--primary);
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-10px);
  }
}

@media (max-width: 1024px) {
  .hero-container {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-title {
    font-size: 2.5rem;
  }

  .hero-buttons {
    justify-content: center;
  }

  .hero-stats {
    justify-content: center;
  }

  .hero-visual {
    display: none;
  }
}

/* ===== Section Styles ===== */
.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--sky);
  color: var(--primary);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 1rem;
}

.section-description {
  font-size: 1.125rem;
  color: var(--muted-foreground);
  max-width: 600px;
  margin: 0 auto;
}

/* ===== How It Works ===== */
.how-it-works {
  padding: 100px 0;
  background: white;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}

.step-card {
  position: relative;
  text-align: center;
  padding: 2rem;
  background: var(--sky-light);
  border-radius: var(--radius-lg);
  transition: all 0.3s ease;
}

.step-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.step-number {
  position: absolute;
  top: -15px;
  right: -15px;
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-family: var(--font-english);
}

.step-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 1.5rem;
  background: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
}

.step-icon i {
  font-size: 2rem;
  color: var(--primary);
}

.step-card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 0.75rem;
}

.step-card p {
  color: var(--muted-foreground);
  font-size: 0.9rem;
}

@media (max-width: 1024px) {
  .steps-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .steps-grid {
    grid-template-columns: 1fr;
  }
}

/* ===== User Types ===== */
.user-types {
  padding: 100px 0;
  background: var(--sky-light);
}

.user-types-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}

.user-type-card {
  position: relative;
  background: white;
  border-radius: var(--radius-lg);
  padding: 2rem;
  text-align: center;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.user-type-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-xl);
  border-color: var(--primary);
}

.user-type-card.featured {
  border-color: var(--accent);
  box-shadow: var(--shadow-xl);
}

.featured-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, var(--accent), var(--primary));
  color: white;
  padding: 0.25rem 1rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
}

.user-type-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 1.5rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.user-type-icon i {
  font-size: 2rem;
  color: white;
}

.user-type-icon.blue {
  background: linear-gradient(135deg, var(--primary), var(--accent));
}

.user-type-icon.green {
  background: linear-gradient(135deg, var(--success), #10b981);
}

.user-type-icon.purple {
  background: linear-gradient(135deg, #8b5cf6, #a855f7);
}

.user-type-icon.orange {
  background: linear-gradient(135deg, var(--warning), #f97316);
}

.user-type-card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 0.75rem;
}

.user-type-card>p {
  color: var(--muted-foreground);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

.user-type-features {
  text-align: right;
  margin-bottom: 1.5rem;
}

[dir="ltr"] .user-type-features {
  text-align: left;
}

.user-type-features li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0;
  font-size: 0.875rem;
  color: var(--foreground);
}

.user-type-features i {
  color: var(--success);
}

@media (max-width: 1024px) {
  .user-types-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .user-types-grid {
    grid-template-columns: 1fr;
  }
}

/* ===== Features ===== */
.features {
  padding: 100px 0;
  background: white;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.feature-card {
  background: var(--sky-light);
  border-radius: var(--radius-lg);
  padding: 2rem;
  text-align: center;
  transition: all 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.feature-icon {
  width: 70px;
  height: 70px;
  margin: 0 auto 1.5rem;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
}

.feature-icon i {
  font-size: 1.75rem;
  color: white;
}

.feature-icon.blue {
  background: linear-gradient(135deg, var(--primary), var(--accent));
}

.feature-icon.green {
  background: linear-gradient(135deg, var(--success), #10b981);
}

.feature-icon.purple {
  background: linear-gradient(135deg, #8b5cf6, #a855f7);
}

.feature-icon.orange {
  background: linear-gradient(135deg, var(--warning), #f97316);
}

.feature-icon.cyan {
  background: linear-gradient(135deg, var(--accent), #22d3d1);
}

.feature-icon.pink {
  background: linear-gradient(135deg, #ec4899, #f472b6);
}

.feature-icon.teal {
  background: linear-gradient(135deg, #14b8a6, #2dd4bf);
}

.feature-icon.amber {
  background: linear-gradient(135deg, #f59e0b, #fbbf24);
}

.feature-icon.red {
  background: linear-gradient(135deg, var(--error), #f87171);
}

.feature-card h3 {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 0.75rem;
}

.feature-card p {
  color: var(--muted-foreground);
  font-size: 0.875rem;
}

@media (max-width: 1024px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .features-grid {
    grid-template-columns: 1fr;
  }
}

/* ===== Stats Section ===== */
.stats-section {
  padding: 80px 0;
  background: linear-gradient(135deg, var(--navy), var(--navy-light));
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}

.stat-card {
  text-align: center;
  padding: 2rem;
}

.stat-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto 1rem;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stat-icon i {
  font-size: 1.5rem;
  color: var(--primary-light);
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 800;
  color: white;
  font-family: var(--font-english);
  margin-bottom: 0.5rem;
}

.stat-label {
  font-size: 1.125rem;
  font-weight: 600;
  color: white;
  margin-bottom: 0.25rem;
}

.stat-description {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.7);
}

@media (max-width: 1024px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }
}

/* ===== Testimonials ===== */
.testimonials {
  padding: 100px 0;
  background: var(--sky-light);
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.testimonial-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: all 0.3s ease;
}

.testimonial-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.testimonial-rating {
  margin-bottom: 1rem;
}

.testimonial-rating i {
  color: var(--warning);
}

.testimonial-text {
  color: var(--foreground);
  font-size: 1rem;
  line-height: 1.8;
  margin-bottom: 1.5rem;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.author-avatar {
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.25rem;
}

.author-name {
  font-weight: 600;
  color: var(--navy);
}

.author-title {
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

@media (max-width: 1024px) {
  .testimonials-grid {
    grid-template-columns: 1fr;
  }
}

/* ===== CTA Section ===== */
.cta-section {
  padding: 100px 0;
  background: linear-gradient(135deg, var(--primary), var(--accent));
}

.cta-content {
  text-align: center;
  max-width: 700px;
  margin: 0 auto;
}

.cta-content h2 {
  font-size: 2.5rem;
  font-weight: 800;
  color: white;
  margin-bottom: 1rem;
}

.cta-content p {
  font-size: 1.25rem;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 2rem;
}

.cta-buttons {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.cta-section .btn-hero {
  background: white;
  color: var(--primary);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.cta-section .btn-hero:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

.cta-section .btn-hero-outline {
  background: transparent;
  color: white;
  border-color: white;
}

.cta-section .btn-hero-outline:hover {
  background: white;
  color: var(--primary);
}

.cta-features {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.cta-features span {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: white;
  font-size: 0.9rem;
}

.cta-features i {
  color: rgba(255, 255, 255, 0.8);
}

/* ===== Footer ===== */
.footer {
  background: var(--navy);
  color: white;
  padding: 80px 0 30px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-brand .logo {
  color: white;
  margin-bottom: 1rem;
}

.footer-brand p {
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 1.5rem;
  max-width: 300px;
}

.social-links {
  display: flex;
  gap: 1rem;
}

.social-links a {
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
}

.social-links a:hover {
  background: var(--primary);
  transform: translateY(-3px);
}

.footer-links h4 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
}

.footer-links ul li {
  margin-bottom: 0.75rem;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.7);
  transition: color 0.3s;
}

.footer-links a:hover {
  color: var(--primary-light);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-bottom p {
  color: rgba(255, 255, 255, 0.7);
}

.footer-legal {
  display: flex;
  gap: 2rem;
}

.footer-legal a {
  color: rgba(255, 255, 255, 0.7);
  transition: color 0.3s;
}

.footer-legal a:hover {
  color: var(--primary-light);
}

@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
}

/* ===== Phase 5 Accessibility, WCAG 2.2 AA Contrast & Responsive Parity ===== */
.skip-link {
  position: absolute;
  inset-block-start: -100px;
  inset-inline-start: 1rem;
  z-index: 99999;
  padding: 0.65rem 1.25rem;
  background: var(--navy);
  color: #ffffff;
  font-weight: 700;
  border-radius: var(--radius);
  text-decoration: none;
}
.skip-link:focus {
  inset-block-start: 0.75rem;
  outline: 3px solid var(--primary-light);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--primary-dark);
  outline-offset: 2px;
}

.sidebar-link:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: -2px;
}

/* Status badges contrast parity across workflows */
.status-badge.pending_funding,
.status-badge.revision_requested,
.status-badge.under_review,
.status-badge.open {
  background: #fef3c7;
  color: #92400e;
}
.status-badge.funded,
.status-badge.partially_released,
.status-badge.released,
.status-badge.resolved,
.status-badge.verified,
.status-badge.shortlisted,
.status-badge.paid {
  background: #dcfce7;
  color: #166534;
}
.status-badge.disputed,
.status-badge.rejected,
.status-badge.cancelled,
.status-badge.failed {
  background: #fee2e2;
  color: #991b1b;
}
.status-badge.submitted,
.status-badge.in_progress,
.status-badge.dismissed,
.status-badge.withdrawn {
  background: #e0f2fe;
  color: #075985;
}

.skill-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
  background: var(--muted);
  color: var(--navy);
  border: 1px solid var(--border);
  font-size: 0.84rem;
  font-weight: 600;
}

.alert {
  padding: 0.9rem 1.15rem;
  border-radius: var(--radius);
  margin-bottom: 1rem;
  font-weight: 600;
  border: 1px solid transparent;
}
.alert-success { background: #dcfce7; color: #166534; border-color: #86efac; }
.alert-error   { background: #fef2f2; color: #991b1b; border-color: #fca5a5; }
.alert-warning { background: #fef3c7; color: #92400e; border-color: #fcd34d; }
.alert-info    { background: #e0f2fe; color: #075985; border-color: #7dd3fc; }

@media (max-width: 900px) {
  .project-detail-grid,
  .profile-layout-grid {
    grid-template-columns: 1fr !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ===== Shared UI Components (Public & Dashboard Parity) ===== */
#main-content > .container {
  padding-top: 108px !important;
  padding-bottom: 3.5rem;
}

.public-shell {
  padding: 108px 0 4rem;
  background: #f8fafc;
  min-height: calc(100vh - 80px);
}

.btn-sm {
  padding: 0.48rem 0.95rem;
  font-size: 0.875rem;
  border-radius: 0.55rem;
  line-height: 1.3;
}

.btn-secondary {
  background: var(--muted);
  color: var(--navy);
  border: 1px solid var(--border);
}
.btn-secondary:hover {
  background: #e2e8f0;
  color: var(--navy);
}

.dash-card,
.card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.5rem;
}

.dash-card-header,
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--border);
}

.dash-card-header h3,
.dash-card-header h2,
.card-header h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--navy);
  margin: 0;
}

.empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
  color: var(--muted-foreground);
}
.empty-state i {
  font-size: 2.5rem;
  color: var(--primary);
  opacity: 0.45;
  margin-bottom: 0.75rem;
  display: block;
}
.empty-state h3 {
  color: var(--navy);
  margin-bottom: 0.4rem;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 700;
  background: var(--muted);
  color: var(--navy);
}
.status-badge.active,
.status-badge.completed,
.status-badge.paid,
.status-badge.approved,
.status-badge.published {
  background: #dcfce7;
  color: #166534;
}
.status-badge.pending,
.status-badge.draft {
  background: #fef3c7;
  color: #92400e;
}

/* Form controls inside public & directory views */
.public-shell input[type="text"],
.public-shell input[type="email"],
.public-shell input[type="password"],
.public-shell input[type="number"],
.public-shell input[type="date"],
.public-shell input[type="url"],
.public-shell input[type="tel"],
.public-shell select,
.public-shell textarea,
.dir-filter-card input[type="text"],
.dir-filter-card input[type="number"],
.dir-filter-card select,
.dash-card input[type="text"],
.dash-card input[type="email"],
.dash-card input[type="password"],
.dash-card input[type="number"],
.dash-card input[type="date"],
.dash-card input[type="url"],
.dash-card input[type="tel"],
.dash-card select,
.dash-card textarea {
  width: 100%;
  padding: 0.62rem 0.9rem;
  border: 1.5px solid var(--border);
  border-radius: 0.6rem;
  background: #ffffff;
  color: var(--foreground);
  font-family: inherit;
  font-size: 0.92rem;
  line-height: 1.45;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.public-shell input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
.public-shell select,
.dir-filter-card input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
.dir-filter-card select,
.dash-card input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
.dash-card select {
  height: 44px;
}
.public-shell textarea,
.dash-card textarea {
  min-height: 100px;
  resize: vertical;
}
.public-shell input:focus,
.public-shell select:focus,
.public-shell textarea:focus,
.dir-filter-card input:focus,
.dir-filter-card select:focus,
.dash-card input:focus,
.dash-card select:focus,
.dash-card textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(3, 105, 161, 0.14);
}
.pagination-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 1rem;
}
.form-group label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--navy);
}

/* ===== Directory Hero, Filters & Profile Cards ===== */
.dir-breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--muted-foreground);
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}
.dir-breadcrumb a:hover {
  color: var(--primary);
}

.dir-hero {
  background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 55%, #0369a1 100%);
  color: #ffffff;
  padding: 2rem;
  border-radius: var(--radius-lg);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  box-shadow: var(--shadow-md);
}
.dir-hero h1,
.dir-hero h2 {
  font-size: 1.65rem;
  font-weight: 800;
  margin: 0 0 0.4rem;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 0.65rem;
}
.dir-hero p {
  margin: 0;
  color: #e2e8f0;
  font-size: 0.95rem;
  max-width: 640px;
}
.dir-hero-pills {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-top: 0.9rem;
}
.dir-hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.8rem;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #f8fafc;
  font-size: 0.8rem;
  font-weight: 600;
}
.dir-hero .dir-switch-btn {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  white-space: nowrap;
}
.dir-hero .dir-switch-btn:hover {
  background: #ffffff;
  color: var(--navy);
}

.dir-filter-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.5rem;
}
.dir-filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(185px, 1fr));
  gap: 1rem;
  align-items: end;
}
.dir-filter-field label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 0.4rem;
}
.dir-filter-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}
.dir-filter-actions .btn {
  height: 44px;
}

.dir-results-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  color: var(--muted-foreground);
  flex-wrap: wrap;
  gap: 0.5rem;
}

.dir-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(315px, 1fr));
  gap: 1.35rem;
}
.dir-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.4rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.dir-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-light);
}
.dir-card-head {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}
.dir-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--sky);
  background: var(--sky-light);
  flex-shrink: 0;
}
.dir-avatar.firm {
  border-radius: var(--radius);
}
.dir-identity {
  min-width: 0;
  flex: 1;
}
.dir-name {
  margin: 0 0 0.2rem;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--navy);
}
.dir-name a:hover {
  color: var(--primary);
}
.dir-loc {
  font-size: 0.82rem;
  color: var(--muted-foreground);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.dir-rating-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  background: #fef3c7;
  color: #92400e;
  font-size: 0.8rem;
  font-weight: 700;
  flex-shrink: 0;
}

.dir-stats-strip {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding: 0.65rem 0.85rem;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 0.6rem;
  font-size: 0.82rem;
  color: var(--foreground);
}
.dir-stats-strip span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 600;
}

.dir-bio {
  margin: 0;
  font-size: 0.88rem;
  color: var(--muted-foreground);
  line-height: 1.6;
  min-height: 2.8rem;
}

.dir-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.dir-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.22rem 0.6rem;
  border-radius: var(--radius-full);
  background: var(--sky-light);
  color: var(--primary-dark);
  border: 1px solid #bae6fd;
  font-size: 0.76rem;
  font-weight: 700;
}

.dir-card-foot {
  margin-top: auto;
  padding-top: 0.9rem;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  flex-wrap: wrap;
}
.dir-rate strong {
  display: block;
  font-size: 1rem;
  color: var(--navy);
}
.dir-rate small {
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

@media (max-width: 768px) {
  .public-shell,
  #main-content > .container {
    padding-top: 96px !important;
  }
  .form-row {
    grid-template-columns: 1fr;
  }
  .dir-grid {
    grid-template-columns: 1fr;
  }
  .dir-hero {
    padding: 1.4rem;
  }
}
