/* ===================================================================
   Homepage V2 Styles - Bahrain Skills Platform
   Modern, 2025-Standard Homepage Design
   Author: FEDEV
   Date: 2025-12-31
   =================================================================== */

/* ===================================================================
   RESET & BASE STYLES
   =================================================================== */
.home-v2-wrapper {
  background: #fff;
  min-height: 100vh;
}

/* Arabic Font - Tajawal (optimized for Arabic readability) */
/* Apply to all elements within homepage v2 when in Arabic mode (default language) */
.home-v2-wrapper,
.home-v2-wrapper *,
.home-v2-wrapper h1,
.home-v2-wrapper h2,
.home-v2-wrapper h3,
.home-v2-wrapper h4,
.home-v2-wrapper p,
.home-v2-wrapper span,
.home-v2-wrapper a,
.home-v2-wrapper button,
.home-v2-wrapper input,
.home-v2-wrapper label,
.home-v2-wrapper div {
  font-family: 'Tajawal', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
}

/* CRITICAL: Preserve Font Awesome icons - exclude from font-family override */
.home-v2-wrapper i[class*="fa-"],
.home-v2-wrapper .fa,
.home-v2-wrapper .fas,
.home-v2-wrapper .far,
.home-v2-wrapper .fal,
.home-v2-wrapper .fab {
  font-family: 'Font Awesome 5 Free', 'Font Awesome 5 Brands' !important;
}
.home-v2-wrapper .fas { font-weight: 900 !important; }
.home-v2-wrapper .far { font-weight: 400 !important; }
.home-v2-wrapper .fab { font-weight: 400 !important; }

/* ===================================================================
   MICRO-INTERACTIONS & ANIMATIONS (Phase 2)
   =================================================================== */

/* Smooth scroll behavior */
html {
  scroll-behavior: smooth;
}

/* Fade-in animation for sections */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Pulse animation for CTAs */
@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

/* Shimmer animation for loading states */
@keyframes shimmer {
  0% {
    background-position: -1000px 0;
  }
  100% {
    background-position: 1000px 0;
  }
}

/* Bounce animation for notifications */
@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-10px);
  }
  60% {
    transform: translateY(-5px);
  }
}

/* Glow effect */
@keyframes glow {
  0%, 100% {
    box-shadow: 0 0 20px rgba(230, 0, 38, 0.3);
  }
  50% {
    box-shadow: 0 0 30px rgba(230, 0, 38, 0.6);
  }
}

/* Apply fade-in to main sections */
.hero-section,
.bento-grid-section,
.category-pills-section,
.fresh-opportunities,
.social-proof-section {
  animation: fadeInUp 0.8s ease-out;
}

/* Stagger animation delays */
.bento-grid-section {
  animation-delay: 0.1s;
}

.category-pills-section {
  animation-delay: 0.2s;
}

.fresh-opportunities {
  animation-delay: 0.3s;
}

.social-proof-section {
  animation-delay: 0.4s;
}

/* Enhanced button interactions */
.cta-btn,
.btn-view-details,
.btn-view-all-reviews {
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.cta-btn::before,
.btn-view-details::before,
.btn-view-all-reviews::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.cta-btn:hover::before,
.btn-view-details:hover::before,
.btn-view-all-reviews:hover::before {
  width: 300px;
  height: 300px;
}

.cta-btn:hover,
.btn-view-details:hover,
.btn-view-all-reviews:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 10px 25px rgba(230, 0, 38, 0.4);
}

.cta-btn:active,
.btn-view-details:active,
.btn-view-all-reviews:active {
  transform: translateY(0) scale(0.98);
}

/* Card hover micro-interactions */
.bento-card,
.category-pill,
.project-card,
.testimonial-card {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Smooth link transitions */
a {
  transition: color 0.3s ease, background-color 0.3s ease, transform 0.3s ease;
}

/* Focus states for accessibility */
*:focus-visible {
  outline: 3px solid rgba(230, 0, 38, 0.5);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ===================================================================
   SKELETON LOADING STATES (Phase 2)
   =================================================================== */

/* Base skeleton styles */
.skeleton {
  background: linear-gradient(90deg, #F0F0F0 25%, #E0E0E0 50%, #F0F0F0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 8px;
}

/* Skeleton variations */
.skeleton-text {
  height: 16px;
  margin-bottom: 8px;
  border-radius: 4px;
}

.skeleton-text.large {
  height: 24px;
}

.skeleton-text.small {
  height: 12px;
  width: 60%;
}

.skeleton-circle {
  width: 80px;
  height: 80px;
  border-radius: 50%;
}

.skeleton-pill {
  height: 44px;
  min-width: 120px;
  border-radius: 50px;
}

.skeleton-card {
  height: 300px;
  border-radius: 16px;
}

/* Category Pills Skeleton */
.skeleton-pills-container {
  display: flex;
  gap: 1rem;
  padding: 1rem 0 2rem;
  overflow-x: hidden;
}

/* Project Cards Skeleton */
.skeleton-project-card {
  min-width: 320px;
  max-width: 320px;
  background: #fff;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.skeleton-project-card .skeleton-text:first-child {
  width: 80%;
  height: 20px;
  margin-bottom: 12px;
}

.skeleton-project-card .skeleton-text:nth-child(2) {
  width: 100%;
  margin-bottom: 8px;
}

.skeleton-project-card .skeleton-text:nth-child(3) {
  width: 90%;
  margin-bottom: 16px;
}

.skeleton-project-card .skeleton-meta {
  display: flex;
  gap: 1rem;
  margin-bottom: 16px;
}

.skeleton-project-card .skeleton-meta .skeleton-text {
  width: 80px;
  height: 14px;
}

.skeleton-project-card .skeleton-button {
  width: 100%;
  height: 40px;
  border-radius: 8px;
}

/* Testimonials Skeleton */
.skeleton-testimonial-card {
  background: #fff;
  border-radius: 20px;
  padding: 2.5rem;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.skeleton-testimonial-card .skeleton-stars {
  display: flex;
  gap: 6px;
  margin-bottom: 8px;
}

.skeleton-testimonial-card .skeleton-stars .skeleton-star {
  width: 18px;
  height: 18px;
  border-radius: 2px;
}

.skeleton-testimonial-card .skeleton-text:nth-of-type(1) {
  width: 100%;
  height: 16px;
}

.skeleton-testimonial-card .skeleton-text:nth-of-type(2) {
  width: 90%;
  height: 16px;
}

.skeleton-testimonial-card .skeleton-text:nth-of-type(3) {
  width: 70%;
  height: 16px;
  margin-bottom: 16px;
}

.skeleton-testimonial-card .skeleton-name {
  width: 120px;
  height: 18px;
  margin-top: 16px;
}

.skeleton-testimonial-card .skeleton-badge {
  width: 100px;
  height: 24px;
  border-radius: 20px;
}

/* Hide skeleton when content loads */
.content-loaded .skeleton-pills-container,
.content-loaded .skeleton-project-card,
.content-loaded .skeleton-testimonial-card {
  display: none;
}

/* Show real content only when loaded */
.pills-container,
.project-cards-carousel,
.testimonials-grid {
  opacity: 0;
  transition: opacity 0.3s ease;
}

.content-loaded .pills-container,
.content-loaded .project-cards-carousel,
.content-loaded .testimonials-grid {
  opacity: 1;
}

/* ===================================================================
   HERO SECTION
   =================================================================== */
.hero-section {
  background:
    linear-gradient(135deg, rgba(230, 0, 38, 0.85), rgba(255, 75, 92, 0.75)),
    url('<?php echo SITE_URL; ?>assets/img/hero-background.jpg') center center / cover no-repeat;
  padding: 140px 5% 80px;
  text-align: center;
  position: relative;
  background-attachment: fixed; /* Parallax effect */
}

/* Fallback for browsers that don't support PHP in CSS */
.hero-section {
  background:
    linear-gradient(135deg, rgba(230, 0, 38, 0.85), rgba(255, 75, 92, 0.75)),
    url('../img/hero-background.jpg') center center / cover no-repeat;
  background-attachment: fixed;
}

.hero-badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
  padding: 8px 20px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  backdrop-filter: blur(10px);
}

.hero-badge i {
  margin-right: 6px;
}

.hero-title {
  font-size: 3rem;
  font-weight: 700;
  line-height: 1.2;
  color: #fff;
  margin-bottom: 2rem;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* ===================================================================
   ROLE TOGGLE COMPONENT
   =================================================================== */
.role-toggle-container {
  position: relative;
  display: inline-flex;
  background: #EAECEF;
  padding: 4px;
  border-radius: 50px;
  margin-bottom: 2rem;
}

.toggle-btn {
  padding: 12px 32px;
  border: none;
  background: transparent;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: color 0.3s ease;
  color: #666;
  z-index: 2;
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
}

.toggle-btn.active {
  color: #fff;
}

.toggle-btn i {
  font-size: 1rem;
}

.toggle-slider {
  position: absolute;
  top: 4px;
  left: 4px;
  width: calc(50% - 4px);
  height: calc(100% - 8px);
  background: linear-gradient(135deg, #E60026 0%, #FF4B5C 100%);
  border-radius: 50px;
  transition: transform 0.3s ease;
  z-index: 1;
}

/* Slider position based on active button */
#hire-mode.active ~ .toggle-slider {
  transform: translateX(0);
}

#work-mode.active ~ .toggle-slider {
  transform: translateX(100%);
}

/* ===================================================================
   DYNAMIC HERO CONTENT
   =================================================================== */
.hero-content {
  max-width: 700px;
  margin: 0 auto 3rem;
}

.mode-content {
  transition: opacity 0.3s ease;
  opacity: 0;
}

.mode-content.active {
  opacity: 1;
}

.mode-content h2 {
  font-size: 1.8rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 1rem;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.mode-content p {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.95);
  line-height: 1.6;
  margin-bottom: 1.5rem;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.cta-btn {
  display: inline-block;
  background: #fff;
  color: #E60026;
  padding: 14px 32px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.3s ease;
  text-decoration: none;
  border: 2px solid #fff;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.cta-btn:hover {
  background: #E60026;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
  text-decoration: none;
}

/* ===================================================================
   TRUST SIGNALS
   =================================================================== */
.trust-signals {
  display: flex;
  justify-content: center;
  gap: 3rem;
  margin-top: 3rem;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stat-number {
  font-size: 2rem;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.stat-label {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.9);
  margin-top: 0.5rem;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

/* ===================================================================
   RESPONSIVE DESIGN - MOBILE FIRST
   =================================================================== */

/* Mobile Base (320px - 575px) */
@media (max-width: 575px) {
  .hero-section {
    padding: 100px 20px 60px;
    background-attachment: scroll; /* Disable parallax on mobile for better performance */
  }

  .hero-title {
    font-size: 2rem;
  }

  .role-toggle-container {
    flex-direction: column;
    width: 100%;
    max-width: 300px;
  }

  .toggle-btn {
    width: 100%;
    justify-content: center;
    padding: 14px 24px;
  }

  .toggle-slider {
    width: calc(100% - 8px);
    height: calc(50% - 4px);
    top: 4px;
    left: 4px;
  }

  #hire-mode.active ~ .toggle-slider {
    transform: translateY(0);
  }

  #work-mode.active ~ .toggle-slider {
    transform: translateY(100%);
  }

  .mode-content h2 {
    font-size: 1.4rem;
  }

  .mode-content p {
    font-size: 1rem;
  }

  .trust-signals {
    flex-direction: column;
    gap: 1.5rem;
  }

  .stat-number {
    font-size: 1.6rem;
  }
}

/* Tablet (576px - 767px) */
@media (min-width: 576px) and (max-width: 767px) {
  .hero-title {
    font-size: 2.2rem;
  }

  .trust-signals {
    gap: 2rem;
  }
}

/* Tablet Landscape / Small Desktop (768px - 991px) */
@media (min-width: 768px) and (max-width: 991px) {
  .hero-title {
    font-size: 2.5rem;
  }
}

/* Desktop (992px and up) */
@media (min-width: 992px) {
  .hero-section {
    padding: 140px 5% 80px;
  }

  .hero-title {
    font-size: 3rem;
  }
}

/* Large Desktop (1200px and up) */
@media (min-width: 1200px) {
  .hero-title {
    font-size: 3.2rem;
  }
}

/* ===================================================================
   RTL (Arabic) SUPPORT
   =================================================================== */
[dir="rtl"] .hero-badge i {
  margin-right: 0;
  margin-left: 6px;
}

[dir="rtl"] .toggle-btn {
  flex-direction: row-reverse;
}

[dir="rtl"] .toggle-btn i {
  margin-right: 0;
  margin-left: 8px;
}

/* ===================================================================
   ACCESSIBILITY
   =================================================================== */

/* Focus states for keyboard navigation */
.toggle-btn:focus {
  outline: 2px solid #E60026;
  outline-offset: 2px;
}

.cta-btn:focus {
  outline: 2px solid #E60026;
  outline-offset: 2px;
}

/* Ensure minimum touch target size (48x48px) */
@media (max-width: 767px) {
  .toggle-btn {
    min-height: 48px;
  }

  .cta-btn {
    min-height: 48px;
    padding: 14px 32px;
  }
}

/* ===================================================================
   ANIMATIONS & MICRO-INTERACTIONS
   =================================================================== */

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.mode-content.active {
  animation: fadeIn 0.3s ease;
}

/* Button hover glow effect */
.cta-btn:hover {
  box-shadow: 0 8px 20px rgba(230, 0, 38, 0.3);
}

/* ===================================================================
   BENTO GRID SECTION - Value Propositions (Phase 2)
   =================================================================== */
.bento-grid-section {
  padding: 80px 5% 60px;
  background: #fff;
}

.bento-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 220px;
  gap: 1.5rem;
  margin-top: 3rem;
}

/* Bento Card Base Styles */
.bento-card {
  position: relative;
  padding: 2rem;
  border-radius: 20px;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.bento-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* Grid Layouts - Asymmetric Bento Pattern */
.bento-card.large {
  grid-column: span 2;
  grid-row: span 2;
}

.bento-card.tall {
  grid-column: span 1;
  grid-row: span 2;
}

.bento-card.wide {
  grid-column: span 2;
  grid-row: span 1;
  /* min-height handled by grid-auto-rows, content naturally fills space */
}

.bento-card.square {
  grid-column: span 1;
  grid-row: span 1;
}

/* Card Backgrounds - Red Brand Gradients */
.bento-card.primary-gradient {
  background: linear-gradient(135deg, #E60026 0%, #FF4B5C 100%);
  color: #fff;
}

.bento-card.accent-bg {
  background: linear-gradient(135deg, #FF6B6B 0%, #FF8E8E 100%);
  color: #fff;
}

.bento-card.success-bg {
  background: linear-gradient(135deg, #FFE5E5 0%, #FFD1D1 100%);
  border: 2px solid #FFB8B8;
  color: #1A1A1A;
}

.bento-card.support-bg {
  background: linear-gradient(135deg, #C7001F 0%, #E60026 100%);
  color: #fff;
}

.bento-card.verified-bg {
  background: linear-gradient(135deg, #FFF0F0 0%, #FFE0E0 100%);
  border: 2px solid #FFC9C9;
  color: #1A1A1A;
}

.bento-card.workflow-bg {
  background: linear-gradient(135deg, #8B0015 0%, #A8001A 100%);
  color: #fff;
}

/* Card Icons */
.bento-card .card-icon {
  width: 60px;
  height: 60px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  backdrop-filter: blur(10px);
}

.bento-card.success-bg .card-icon,
.bento-card.verified-bg .card-icon {
  background: rgba(230, 0, 38, 0.1);
}

.bento-card .card-icon i {
  font-size: 1.8rem;
}

.bento-card.success-bg .card-icon i,
.bento-card.verified-bg .card-icon i {
  color: #E60026;
}

/* Card Typography */
.bento-card h3 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  line-height: 1.3;
}

.bento-card p {
  font-size: 0.95rem;
  line-height: 1.6;
  opacity: 0.9;
  margin: 0;
}

/* Card Decorations */
.card-decoration {
  position: absolute;
  bottom: -20px;
  right: -20px;
  font-size: 8rem;
  opacity: 0.1;
}

.verified-badge {
  position: absolute;
  bottom: 1rem;
  right: 1rem;
  font-size: 3rem;
  opacity: 0.15;
}

/* Stat Highlight (for Fast Payment card) */
.stat-highlight {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.3);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.stat-highlight .stat-number {
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1;
}

.stat-highlight .stat-label {
  font-size: 0.85rem;
  opacity: 0.9;
}

/* Success Circle (for Success Rate card) */
.card-content-horizontal {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.card-visual {
  flex-shrink: 0;
}

.success-circle {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: linear-gradient(135deg, #E60026 0%, #FF4B5C 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 20px rgba(230, 0, 38, 0.3);
}

.success-circle span {
  font-size: 2rem;
  font-weight: 700;
  color: #fff;
}

/* Workflow Steps (for Easy Workflow card) */
.workflow-steps {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.workflow-steps .step {
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
  backdrop-filter: blur(10px);
}

.workflow-steps .step-arrow {
  opacity: 0.5;
  font-size: 0.9rem;
}

/* Mobile Responsive - Stack on Small Screens */
@media (max-width: 1024px) {
  .bento-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 200px;
  }

  .bento-card.large {
    grid-column: span 2;
    grid-row: span 2;
  }

  .bento-card.tall,
  .bento-card.square {
    grid-column: span 1;
    grid-row: span 1;
  }

  .bento-card.wide {
    grid-column: span 2;
    grid-row: span 1;
  }
}

@media (max-width: 768px) {
  .bento-grid-section {
    padding: 60px 5% 40px;
  }

  .bento-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: auto;
    gap: 1rem;
  }

  .bento-card {
    padding: 1.75rem;
  }

  .bento-card.large,
  .bento-card.tall,
  .bento-card.square {
    grid-column: span 1;
    grid-row: span 1;
    min-height: 220px;
  }

  .bento-card.wide {
    grid-column: span 1;
    grid-row: span 1;
    min-height: 280px; /* Extra height for workflow steps */
  }

  .bento-card h3 {
    font-size: 1.1rem;
    line-height: 1.4;
    margin-bottom: 0.6rem;
  }

  .bento-card p {
    font-size: 0.9rem;
    line-height: 1.65;
  }

  .card-content-horizontal {
    flex-direction: column;
    align-items: flex-start;
  }

  .success-circle {
    width: 80px;
    height: 80px;
  }

  .success-circle span {
    font-size: 1.5rem;
  }
}

/* Extra Small Screens - Bento Grid Adjustments */
@media (max-width: 575px) {
  .bento-grid-section {
    padding: 50px 20px 30px;
  }

  .bento-card {
    padding: 1.5rem;
    min-height: 180px;
  }

  .bento-card.wide {
    min-height: 260px; /* Extra height for workflow steps on small screens */
  }

  .bento-card h3 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
  }

  .bento-card p {
    font-size: 0.85rem;
    line-height: 1.6;
  }

  .bento-card .card-icon {
    width: 50px;
    height: 50px;
    margin-bottom: 1rem;
  }

  .bento-card .card-icon i {
    font-size: 1.5rem;
  }
}

/* ===================================================================
   CATEGORY PILLS SECTION (Day 3)
   =================================================================== */
.category-pills-section {
  padding: 60px 5% 40px;
  background: #F8F9FD;
  min-height: 200px;
}

.section-title {
  font-size: 2rem;
  font-weight: 700;
  color: #1A1A1A;
  margin-bottom: 2rem;
  text-align: center;
}

.pills-container {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  padding: 1rem 0 2rem;
  -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
  scroll-behavior: smooth;
  min-height: 80px;
}

/* Custom scrollbar for pills container */
.pills-container::-webkit-scrollbar {
  height: 8px;
}

.pills-container::-webkit-scrollbar-track {
  background: #E5E7EB;
  border-radius: 10px;
}

.pills-container::-webkit-scrollbar-thumb {
  background: #E60026;
  border-radius: 10px;
}

.pills-container::-webkit-scrollbar-thumb:hover {
  background: #c7001f;
}

.category-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: #fff;
  border: 2px solid transparent;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.95rem;
  color: #1A1A1A;
  white-space: nowrap;
  transition: all 0.3s ease;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.category-pill span {
  display: inline-block;
  color: inherit;
  font-size: inherit;
  font-weight: inherit;
  visibility: visible;
  opacity: 1;
}

.category-pill:hover {
  background: #E60026;
  color: #fff;
  border-color: #E60026;
  box-shadow: 0 4px 15px rgba(230, 0, 38, 0.3);
  transform: translateY(-2px);
  text-decoration: none;
}

.category-pill:hover span {
  color: #fff;
}

.view-all-pill {
  background: #E60026;
  color: #fff;
}

.view-all-pill:hover {
  background: #c7001f;
  transform: translateY(-2px) scale(1.05);
}

.view-all-pill i {
  font-size: 0.85rem;
}

/* ===================================================================
   FRESH OPPORTUNITIES SECTION (Day 3)
   =================================================================== */
.fresh-opportunities {
  padding: 60px 5%;
  background: #fff;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.section-header h2 {
  font-size: 2rem;
  font-weight: 700;
  color: #1A1A1A;
  margin: 0;
}

.view-all {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #E60026;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  transition: all 0.3s ease;
}

.view-all:hover {
  color: #c7001f;
  gap: 12px;
  text-decoration: none;
}

.view-all i {
  transition: transform 0.3s ease;
}

.view-all:hover i {
  transform: translateX(4px);
}

/* Project Cards Carousel */
.project-cards-carousel {
  display: flex;
  gap: 1.5rem;
  overflow-x: auto;
  padding: 1rem 0 2rem;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
}

/* Custom scrollbar for carousel */
.project-cards-carousel::-webkit-scrollbar {
  height: 8px;
}

.project-cards-carousel::-webkit-scrollbar-track {
  background: #E5E7EB;
  border-radius: 10px;
}

.project-cards-carousel::-webkit-scrollbar-thumb {
  background: #E60026;
  border-radius: 10px;
}

.project-cards-carousel::-webkit-scrollbar-thumb:hover {
  background: #c7001f;
}

/* Individual Project Card */
.project-card {
  min-width: 320px;
  max-width: 380px;
  background: #fff;
  border: 1px solid #E5E7EB;
  border-radius: 12px;
  padding: 1.5rem;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.project-card:hover {
  border-color: #E60026;
  box-shadow: 0 8px 24px rgba(230, 0, 38, 0.15);
  transform: translateY(-4px);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.card-header h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #1A1A1A;
  margin: 0;
  flex: 1;
  line-height: 1.4;
}

.budget-badge {
  display: inline-block;
  background: #FEF3F2;
  color: #E60026;
  padding: 6px 12px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 0.85rem;
  white-space: nowrap;
}

.project-description {
  font-size: 0.95rem;
  color: #666;
  line-height: 1.6;
  margin: 0;
}

.employer-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem;
  background: #F8F9FD;
  border-radius: 8px;
  font-size: 0.9rem;
}

.employer-info i {
  color: #E60026;
  font-size: 1.1rem;
}

.employer-label {
  color: #666;
  font-weight: 500;
}

.employer-name {
  color: #1A1A1A;
  font-weight: 600;
}

.employer-rating {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  margin-left: auto;
  padding: 0.25rem 0.5rem;
  background: #FFF4E6;
  border-radius: 6px;
  font-weight: 600;
  color: #F59E0B;
}

.employer-rating i {
  color: #F59E0B;
  font-size: 0.85rem;
}

.employer-rating .review-count {
  color: #666;
  font-weight: 400;
  font-size: 0.85rem;
}

.employer-rating.no-rating {
  background: #F3F4F6;
  color: #9CA3AF;
}

.employer-rating.no-rating i {
  color: #D1D5DB;
}

.employer-rating .no-rating-text {
  color: #9CA3AF;
  font-weight: 400;
  font-size: 0.85rem;
}

.card-meta {
  display: flex;
  gap: 1.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid #E5E7EB;
}

.meta-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: #666;
}

.meta-item i {
  color: #999;
  font-size: 0.9rem;
}

.btn-view-details {
  display: inline-block;
  width: 100%;
  text-align: center;
  background: #F8F9FD;
  color: #E60026;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  text-decoration: none;
  border: 2px solid transparent;
}

.btn-view-details:hover {
  background: #E60026;
  color: #fff;
  border-color: #E60026;
  text-decoration: none;
  transform: translateY(-2px);
}

.no-projects {
  text-align: center;
  padding: 3rem;
  color: #666;
}

/* ===================================================================
   RESPONSIVE DESIGN - CATEGORY PILLS & PROJECT CARDS
   =================================================================== */

/* Mobile Base (320px - 575px) */
@media (max-width: 575px) {
  .category-pills-section {
    padding: 40px 20px 30px;
  }

  .section-title {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
  }

  .pills-container {
    padding: 0.5rem 0 1.5rem;
  }

  .category-pill {
    padding: 10px 20px;
    font-size: 0.9rem;
  }

  .fresh-opportunities {
    padding: 40px 20px;
  }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .section-header h2 {
    font-size: 1.5rem;
  }

  .project-card {
    min-width: 280px;
    max-width: 320px;
  }

  .card-header h3 {
    font-size: 1rem;
  }

  .budget-badge {
    font-size: 0.8rem;
  }
}

/* Tablet (576px - 767px) */
@media (min-width: 576px) and (max-width: 767px) {
  .section-title {
    font-size: 1.75rem;
  }

  .project-card {
    min-width: 300px;
    max-width: 350px;
  }
}

/* Tablet Landscape / Small Desktop (768px - 991px) */
@media (min-width: 768px) and (max-width: 991px) {
  .project-card {
    min-width: 320px;
    max-width: 360px;
  }
}

/* Desktop (992px and up) */
@media (min-width: 992px) {
  .project-card {
    min-width: 340px;
    max-width: 380px;
  }
}

/* ===================================================================
   RTL (Arabic) SUPPORT - CATEGORY PILLS & PROJECT CARDS
   =================================================================== */
[dir="rtl"] .view-all {
  flex-direction: row-reverse;
}

[dir="rtl"] .view-all:hover i {
  transform: translateX(-4px);
}

[dir="rtl"] .view-all-pill {
  flex-direction: row-reverse;
}

[dir="rtl"] .card-header {
  flex-direction: row-reverse;
}

[dir="rtl"] .meta-item {
  flex-direction: row-reverse;
}

/* ===================================================================
   SOCIAL PROOF / TESTIMONIALS SECTION (Day 4)
   =================================================================== */
.social-proof-section {
  padding: 80px 5%;
  background: linear-gradient(135deg, #F8F9FD 0%, #fff 100%);
}

.section-header-center {
  text-align: center;
  margin-bottom: 3rem;
}

.section-header-center h2 {
  font-size: 2.2rem;
  font-weight: 700;
  color: #1A1A1A;
  margin-bottom: 1rem;
}

.section-subtitle {
  font-size: 1.1rem;
  color: #666;
  max-width: 600px;
  margin: 0 auto;
}

/* Testimonials Grid */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.testimonial-card {
  background: #fff;
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.testimonial-card:hover {
  box-shadow: 0 8px 24px rgba(230, 0, 38, 0.12);
  transform: translateY(-4px);
}

/* Star Rating */
.stars {
  display: flex;
  gap: 4px;
}

.stars i {
  font-size: 1rem;
  color: #E5E7EB;
  transition: color 0.2s ease;
}

.stars i.filled {
  color: #FFC107;
}

/* Review Message */
.review-message {
  font-size: 1rem;
  line-height: 1.7;
  color: #1A1A1A;
  font-style: italic;
  margin: 0;
  flex: 1;
}

/* Author Info */
.author-info {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #E5E7EB;
}

.author-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: #F8F9FD;
  display: flex;
  align-items: center;
  justify-content: center;
}

.author-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #E60026 0%, #FF4B5C 100%);
  color: #fff;
  font-size: 1.2rem;
}

.author-details {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.author-details strong {
  font-size: 1rem;
  font-weight: 600;
  color: #1A1A1A;
}

.user-type {
  font-size: 0.85rem;
  color: #666;
}

/* ===================================================================
   ENHANCED TESTIMONIALS - Phase 2 Improvements
   =================================================================== */
.testimonial-card.enhanced {
  position: relative;
  padding: 2.5rem;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  gap: 2rem;
  overflow: hidden;
}

.testimonial-card.enhanced:hover {
  box-shadow: 0 12px 32px rgba(230, 0, 38, 0.15);
  transform: translateY(-6px);
}

/* Large Avatar - Prominently Featured */
.author-avatar-large {
  position: relative;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  overflow: visible;
  margin: 0 auto;
  flex-shrink: 0;
}

.author-avatar-large img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  border: 4px solid #fff;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.avatar-placeholder-large {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #E60026 0%, #FF4B5C 100%);
  color: #fff;
  font-size: 2rem;
  border-radius: 50%;
  border: 4px solid #fff;
  box-shadow: 0 6px 20px rgba(230, 0, 38, 0.3);
}

/* Verification Badge */
.verified-indicator {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 28px;
  height: 28px;
  background: #00BFA5;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 3px solid #fff;
  box-shadow: 0 2px 8px rgba(0, 191, 165, 0.4);
}

.verified-indicator i {
  font-size: 0.75rem;
  color: #fff;
}

/* Review Content */
.review-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  text-align: center;
}

.testimonial-card.enhanced .stars {
  justify-content: center;
  gap: 6px;
}

.testimonial-card.enhanced .stars i {
  font-size: 1.1rem;
}

.testimonial-card.enhanced .review-message {
  font-size: 1.05rem;
  line-height: 1.8;
  color: #2D2D2D;
  font-style: italic;
  font-weight: 400;
}

/* Enhanced Author Details */
.testimonial-card.enhanced .author-details {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid #E5E7EB;
}

.author-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: #1A1A1A;
}

.user-type-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(230, 0, 38, 0.1);
  color: #E60026;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
}

.user-type-badge i {
  font-size: 0.75rem;
}

/* Decorative Quote Mark */
.quote-decoration {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  font-size: 3.5rem;
  color: rgba(230, 0, 38, 0.08);
  opacity: 0.5;
  pointer-events: none;
}

/* Mobile Responsive - Enhanced Testimonials */
@media (max-width: 768px) {
  .testimonial-card.enhanced {
    padding: 2rem;
  }

  .author-avatar-large {
    width: 70px;
    height: 70px;
  }

  .avatar-placeholder-large {
    font-size: 1.75rem;
  }

  .testimonial-card.enhanced .review-message {
    font-size: 0.95rem;
  }

  .quote-decoration {
    font-size: 2.5rem;
  }
}

/* View All Reviews Button */
.view-all-container {
  text-align: center;
  margin-top: 3rem;
}

.btn-view-all-reviews {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #E60026;
  color: #fff;
  padding: 14px 32px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.3s ease;
  text-decoration: none;
  border: 2px solid #E60026;
}

.btn-view-all-reviews:hover {
  background: #c7001f;
  border-color: #c7001f;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(230, 0, 38, 0.3);
  color: #fff;
  text-decoration: none;
  gap: 14px;
}

.btn-view-all-reviews i {
  transition: transform 0.3s ease;
}

.btn-view-all-reviews:hover i {
  transform: translateX(4px);
}

.no-reviews {
  text-align: center;
  padding: 3rem;
  color: #666;
  grid-column: 1 / -1;
}

/* ===================================================================
   RESPONSIVE DESIGN - SOCIAL PROOF
   =================================================================== */

/* Mobile Base (320px - 575px) */
@media (max-width: 575px) {
  .social-proof-section {
    padding: 60px 20px;
  }

  .section-header-center h2 {
    font-size: 1.75rem;
  }

  .section-subtitle {
    font-size: 1rem;
  }

  .testimonials-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .testimonial-card {
    padding: 1.5rem;
  }
}

/* Tablet (576px - 767px) */
@media (min-width: 576px) and (max-width: 767px) {
  .testimonials-grid {
    grid-template-columns: 1fr;
  }

  .section-header-center h2 {
    font-size: 2rem;
  }
}

/* Tablet Landscape / Small Desktop (768px - 991px) */
@media (min-width: 768px) and (max-width: 991px) {
  .testimonials-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Desktop (992px and up) */
@media (min-width: 992px) {
  .testimonials-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Large Desktop (1200px and up) */
@media (min-width: 1200px) {
  .section-header-center h2 {
    font-size: 2.5rem;
  }
}

/* ===================================================================
   RTL (Arabic) SUPPORT - SOCIAL PROOF
   =================================================================== */
[dir="rtl"] .author-info {
  flex-direction: row-reverse;
}

[dir="rtl"] .btn-view-all-reviews {
  flex-direction: row-reverse;
}

[dir="rtl"] .btn-view-all-reviews:hover i {
  transform: translateX(-4px);
}

/* ========================================
   Featured Projects Section
   ======================================== */

/* Featured section uses fresh-opportunities class, just add accent styling */
.featured-opportunities {
  background: #FFF;
}

.featured-opportunities .section-header h2 i {
  color: #F59E0B;
  margin-right: 0.5rem;
}

/* Featured project cards get subtle gold accent */
.project-card.featured {
  position: relative;
  border-top: 3px solid #F59E0B;
}

.project-card.featured::before {
  content: '⭐ FEATURED';
  position: absolute;
  top: -12px;
  left: 1rem;
  background: #F59E0B;
  color: #fff;
  padding: 0.25rem 0.75rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.project-card.featured:hover {
  border-top-color: #D97706;
  box-shadow: 0 8px 20px rgba(245, 158, 11, 0.15);
}

/* RTL Support */
[dir="rtl"] .featured-opportunities .section-header h2 i {
  margin-right: 0;
  margin-left: 0.5rem;
}

[dir="rtl"] .project-card.featured::before {
  left: auto;
  right: 1rem;
}

