@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;600;700;900&display=swap');

:root {
  --bg-primary: #cfcfed;
  /* User selected */
  --bg-secondary: #f0f0f5;
  --bg-card: rgba(255, 255, 255, 0.6);
  --purple-dark: #6200ea;
  /* Keep purple brand but maybe adjust? Keeping for now */
  --purple: #6200ea;
  --purple-mid: #7b2ff7;
  --purple-light: #b388ff;
  --purple-glow: rgba(98, 0, 234, 0.2);
  --text-primary: #1a1a2e;
  --text-secondary: #4a4a5e;
  --text-muted: #666;
  --border-color: rgba(0, 0, 0, 0.08);
  /* Darker border for light bg */
  --glass-bg: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(255, 255, 255, 0.5);
  --transition: all 0.3s ease;
}

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Cairo', sans-serif;
  /* Changed to Cairo for Arabic support */
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

/* RTL Support Helpers */
html[dir="rtl"] {
  direction: rtl;
  text-align: right;
}

html[dir="rtl"] .nav-links {
  margin-right: auto;
  margin-left: 0;
}

html[dir="rtl"] .hero-content {
  text-align: right;
}

html[dir="rtl"] .hero-buttons,
html[dir="rtl"] .stats-row {
  justify-content: flex-start;
}

html[dir="rtl"] .contact-item {
  flex-direction: row;
}

html[dir="rtl"] .contact-icon {
  margin-left: 15px;
  margin-right: 0;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: var(--purple);
  border-radius: 4px;
}

/* ===== NAVBAR ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 15px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
  transition: var(--transition);
  will-change: transform;
}

.navbar.scrolled {
  padding: 10px 40px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

.nav-logo {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
  letter-spacing: 1px;
}

.nav-logo span {
  color: var(--purple-mid);
}

.nav-links {
  display: flex;
  gap: 30px;
  list-style: none;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: var(--transition);
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--purple-mid);
  transition: var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--purple-light);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 5px;
}

.hamburger span {
  width: 25px;
  height: 2px;
  background: var(--text-primary);
  transition: var(--transition);
  display: block;
}

/* ===== HERO ===== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: 100px 40px;
}

.hero-bg-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: radial-gradient(ellipse at 50% 50%, rgba(123, 47, 247, 0.08) 0%, transparent 70%);
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 800px;
  animation: fadeInUp 1s ease;
}

.hero-profile {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  margin: 0 auto 30px;
  position: relative;
}

.hero-profile img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--purple-mid);
  box-shadow: 0 0 40px var(--purple-glow), 0 0 80px rgba(123, 47, 247, 0.15);
}

.hero-profile::before {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, var(--purple), var(--purple-light), var(--purple-mid), var(--purple));
  animation: rotateBorder 4s linear infinite;
  z-index: -1;
}

.hero-badge {
  display: inline-block;
  padding: 6px 20px;
  border-radius: 30px;
  font-size: 0.8rem;
  background: rgba(123, 47, 247, 0.15);
  border: 1px solid var(--border-color);
  color: var(--purple-light);
  margin-bottom: 15px;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.hero h1 {
  font-size: 3.2rem;
  font-weight: 800;
  margin-bottom: 10px;
  letter-spacing: -1px;
}

.hero h1 .highlight {
  background: linear-gradient(135deg, var(--purple-mid), var(--purple-light));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero .subtitle {
  font-size: 1.2rem;
  color: var(--text-secondary);
  margin-bottom: 30px;
  font-weight: 300;
}

.hero-buttons {
  display: flex;
  gap: 15px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  padding: 12px 32px;
  border-radius: 50px;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
  cursor: pointer;
  border: none;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--purple), var(--purple-mid));
  color: white;
  box-shadow: 0 4px 25px var(--purple-glow);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 35px var(--purple-glow);
}

.btn-outline {
  background: transparent;
  color: var(--purple-light);
  border: 2px solid var(--purple-mid);
}

.btn-outline:hover {
  background: rgba(123, 47, 247, 0.1);
  transform: translateY(-3px);
}

/* ===== SECTIONS ===== */
.section {
  padding: 100px 40px;
  max-width: 1300px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-header h2 {
  font-size: 2.4rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.section-header h2 .highlight {
  background: linear-gradient(135deg, var(--purple-mid), var(--purple-light));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.section-header p {
  color: var(--text-secondary);
  max-width: 550px;
  margin: 0 auto;
}

.section-line {
  width: 60px;
  height: 3px;
  margin: 15px auto 0;
  background: linear-gradient(90deg, var(--purple), var(--purple-light));
  border-radius: 3px;
}

/* ===== ABOUT ===== */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.about-image {
  position: relative;
}

.about-image img {
  width: 100%;
  border-radius: 20px;
  border: 1px solid var(--border-color);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.about-image .experience-badge {
  position: absolute;
  bottom: 30px;
  right: -30px;
  background: rgba(255, 255, 255, 0.9);
  padding: 20px 30px;
  border-radius: 15px;
  border: 1px solid var(--border-color);
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  text-align: center;
  animation: float 3s ease-in-out infinite;
}

html[dir="rtl"] .experience-badge {
  right: auto;
  left: -30px;
}

.experience-badge .num {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1;
}

.experience-badge .label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  opacity: 0.9;
}

.about-text h3 {
  font-size: 1.6rem;
  margin-bottom: 15px;
}

.about-text p {
  color: var(--text-secondary);
  margin-bottom: 20px;
  line-height: 1.8;
}

.stats-row {
  display: flex;
  gap: 30px;
  margin-top: 30px;
}

.stat-item {
  text-align: center;
}

.stat-item .stat-num {
  font-size: 2rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--purple-mid), var(--purple-light));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.stat-item .stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ===== SKILLS ===== */
.skills-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

.skill-tag {
  padding: 8px 18px;
  border-radius: 30px;
  font-size: 0.8rem;
  background: var(--glass-bg);
  border: 1px solid var(--border-color);
  color: var(--purple-light);
  transition: var(--transition);
}

.skill-tag:hover {
  background: rgba(123, 47, 247, 0.2);
  transform: translateY(-2px);
}

/* ===== PORTFOLIO ===== */
.filter-bar {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.filter-btn {
  padding: 8px 22px;
  border-radius: 30px;
  border: 1px solid var(--border-color);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.85rem;
  transition: var(--transition);
}

.filter-btn:hover,
.filter-btn.active {
  background: linear-gradient(135deg, var(--purple), var(--purple-mid));
  color: white;
  border-color: transparent;
  box-shadow: 0 4px 20px var(--purple-glow);
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.portfolio-item {
  position: relative;
  border-radius: 15px;
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 4/3;
  border: 1px solid var(--border-color);
  transition: var(--transition);
  contain: content;
  will-change: transform;
}

.portfolio-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.portfolio-item:hover img {
  transform: scale(1.08);
}

.portfolio-item .overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(5, 5, 8, 0.9) 100%);
  opacity: 0;
  transition: var(--transition);
  display: flex;
  align-items: flex-end;
  padding: 20px;
}

.portfolio-item:hover .overlay {
  opacity: 1;
}

.portfolio-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(123, 47, 247, 0.2);
}

.overlay-text {
  color: white;
}

.overlay-text h4 {
  font-size: 1rem;
  margin-bottom: 3px;
}

/* ===== SHOW MORE ===== */
.show-more-wrapper {
  text-align: center;
  margin-top: 40px;
}

.show-more-btn svg {
  transition: transform 0.3s ease;
}

.show-more-btn.expanded svg {
  transform: rotate(180deg);
}

.portfolio-item.hidden-item {
  display: none;
}

.portfolio-grid-fade {
  position: relative;
}

.portfolio-grid-fade::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 120px;
  pointer-events: none;
  background: linear-gradient(transparent, var(--bg-primary));
}

.portfolio-grid-fade.no-fade::after {
  display: none;
}

/* ===== PDF SHOWCASE ===== */
.pdf-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 25px;
}

.pdf-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 15px;
  overflow: hidden;
  transition: var(--transition);
}

.pdf-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 40px rgba(123, 47, 247, 0.15);
  border-color: var(--purple-mid);
}

.pdf-card-thumb {
  height: 200px;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(123, 47, 247, 0.1), rgba(153, 69, 255, 0.05));
  display: flex;
  align-items: center;
  justify-content: center;
}

.pdf-card-thumb canvas {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.pdf-thumb-loader {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: var(--purple-light);
  font-size: 0.85rem;
  letter-spacing: 1px;
}

.pdf-card-thumb canvas.loaded+.pdf-thumb-loader {
  display: none;
}

.pdf-card-body {
  padding: 20px;
}

.pdf-card-body h4 {
  font-size: 1rem;
  margin-bottom: 8px;
}

.pdf-card-body p {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 15px;
}

.pdf-card-body .btn {
  font-size: 0.8rem;
  padding: 8px 20px;
  width: 100%;
  justify-content: center;
}

/* ===== CONTACT ===== */
.contact-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.contact-info h3 {
  font-size: 1.8rem;
  margin-bottom: 15px;
}

.contact-info p {
  color: var(--text-secondary);
  margin-bottom: 30px;
  line-height: 1.8;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 20px;
  padding: 15px 20px;
  background: var(--glass-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  transition: var(--transition);
}

.contact-item:hover {
  border-color: var(--purple-mid);
  background: rgba(123, 47, 247, 0.08);
}

.contact-icon {
  width: 45px;
  height: 45px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--purple), var(--purple-mid));
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-icon svg {
  width: 22px;
  height: 22px;
  fill: white;
}

.contact-item-text h4 {
  font-size: 0.9rem;
  margin-bottom: 2px;
}

.contact-item-text p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin: 0;
}

.contact-cta {
  text-align: center;
  padding: 60px 40px;
  background: var(--glass-bg);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  position: relative;
  overflow: hidden;
}

.contact-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 50%, rgba(123, 47, 247, 0.1), transparent 70%);
}

.contact-cta h3 {
  font-size: 1.5rem;
  margin-bottom: 10px;
  position: relative;
}

.contact-cta p {
  color: var(--text-secondary);
  margin-bottom: 25px;
  position: relative;
}

.contact-cta .btn {
  position: relative;
}

/* ===== FOOTER ===== */
.footer {
  text-align: center;
  padding: 30px 40px;
  border-top: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 0.85rem;
}

.footer span {
  color: var(--purple-mid);
}

/* ===== LIGHTBOX ===== */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.95);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 40px;
  backdrop-filter: blur(10px);
}

.lightbox.active {
  display: flex;
}

.lightbox img {
  max-width: 90%;
  max-height: 85vh;
  border-radius: 10px;
  box-shadow: 0 20px 60px rgba(123, 47, 247, 0.3);
  animation: zoomIn 0.3s ease;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 30px;
  background: none;
  border: none;
  color: white;
  font-size: 2rem;
  cursor: pointer;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: var(--transition);
}

.lightbox-close:hover {
  background: rgba(123, 47, 247, 0.3);
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(123, 47, 247, 0.3);
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.lightbox-nav:hover {
  background: rgba(123, 47, 247, 0.6);
}

.lightbox-prev {
  left: 30px;
}

.lightbox-next {
  right: 30px;
}

/* ===== CLIENTS (Famous Institutions) ===== */
.clients-wrapper {
  overflow: hidden;
  padding: 60px 0;
  position: relative;
  background: #ffffff;
  /* Pure white background */
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.clients-wrapper::before,
.clients-wrapper::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 100px;
  z-index: 2;
  pointer-events: none;
}

.clients-wrapper::before {
  left: 0;
  background: linear-gradient(to right, #ffffff, transparent);
}

.clients-wrapper::after {
  right: 0;
  background: linear-gradient(to left, #ffffff, transparent);
}

.clients-track {
  display: flex;
  gap: 60px;
  animation: scrollClients 20s linear infinite;
  width: max-content;
}

.client-item {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 15px 30px;
  background: white;
  border: 1px solid rgba(0, 0, 0, 0.05);
  /* Light border */
  border-radius: 50px;
  min-width: 150px;
  height: 90px;
  transition: var(--transition);
  cursor: default;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.03);
}

.client-item img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: var(--transition);
}

.client-item:hover {
  border-color: var(--purple-mid);
  box-shadow: 0 10px 25px rgba(123, 47, 247, 0.15);
  transform: translateY(-2px);
  background: white;
}

.client-item:hover img {
  transform: scale(1.1);
}

@keyframes scrollClients {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-50%);
  }
}

/* ===== TESTIMONIALS (Client Reviews) ===== */
.testimonials-slider {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 50px;
}

.testimonials-track-container {
  overflow: hidden;
  padding: 20px 0;
}

.testimonials-track {
  display: flex;
  transition: transform 0.5s ease-in-out;
}

.testimonial-card {
  min-width: 100%;
  padding: 40px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  position: relative;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  gap: 20px;
  height: auto;
  max-height: 500px;
  overflow: hidden;
  justify-content: center;
  align-items: center;
}

.testimonial-card.image-card {
  padding: 10px;
}

.testimonial-card.image-card img {
  width: 100%;
  height: 100%;
  max-height: 400px;
  object-fit: contain;
  border-radius: 10px;
}

.testimonial-card:hover {
  border-color: var(--purple-mid);
  transform: translateY(-5px);
  box-shadow: 0 10px 40px rgba(123, 47, 247, 0.15);
}

.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background: var(--glass-bg);
  border: 1px solid var(--border-color);
  color: white;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  z-index: 10;
}

.slider-btn:hover {
  background: var(--purple-mid);
  border-color: var(--purple-mid);
  box-shadow: 0 0 15px var(--purple-glow);
}

.prev-btn {
  left: 0;
}

.next-btn {
  right: 0;
}

.slider-dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition: var(--transition);
}

.dot.active,
.dot:hover {
  background: var(--purple-mid);
  transform: scale(1.2);
  box-shadow: 0 0 10px var(--purple-glow);
}

@media (max-width: 768px) {
  .testimonials-slider {
    padding: 0;
  }

  .slider-btn {
    display: none;
  }

  .client-item {
    margin: 0 10px;
  }
}



/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes zoomIn {
  from {
    opacity: 0;
    transform: scale(0.8);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes rotateBorder {
  to {
    transform: rotate(360deg);
  }
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-15px);
  }
}

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 992px) {

  .about-grid,
  .contact-wrapper {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .hero h1 {
    font-size: 2.4rem;
  }

  .section {
    padding: 70px 20px;
  }

  .portfolio-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  }
}

@media (max-width: 768px) {
  .navbar {
    padding: 12px 20px;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.98);
    padding: 80px 30px 30px;
    gap: 20px;
    transition: right 0.4s ease;
    z-index: 999;
    border-left: 1px solid var(--border-color);
    box-shadow: -5px 0 20px rgba(0, 0, 0, 0.05);
  }

  .nav-links.open {
    right: 0;
  }

  .hamburger {
    display: flex;
    z-index: 1001;
  }

  .hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  .hamburger.active span:nth-child(2) {
    opacity: 0;
  }

  .hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }

  .hero {
    padding: 80px 20px;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero-profile {
    width: 140px;
    height: 140px;
  }

  .stats-row {
    gap: 15px;
  }

  .filter-bar {
    gap: 6px;
  }

  .filter-btn {
    padding: 6px 14px;
    font-size: 0.75rem;
  }

  .portfolio-grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .pdf-grid {
    grid-template-columns: 1fr;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }
}

@media (max-width: 480px) {
  .portfolio-grid {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    font-size: 1.7rem;
  }
}

/* Force LTR direction for the track to keep animation logic simple */
.clients-track {
  direction: ltr;
  padding-right: 60px;
  /* Equal to gap to ensure 50% width matches perfectly */
  box-sizing: content-box;
  /* Ensure padding adds to width if needed, essentially defaults to content-box for width calculation usually but flex might be border-box */
}

@keyframes scrollClients {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-50%);
  }
}