/* ============================================
   VIRIDU — Agency Website Stylesheet
   viridu.com
   ============================================ */

/* === CSS VARIABLES === */
:root {
  --primary: #0D1117;
  --surface: #161B22;
  --accent: #2F81F7;
  --text: #E6EDF3;
  --text-muted: #7D8590;
  --border: rgba(255, 255, 255, 0.08);
  --radius: 12px;
  --transition: 0.2s ease;
  --font-heading: 'Poppins', sans-serif;
  --font-body: 'Inter', sans-serif;
}

/* === CSS RESET === */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text);
  background-color: var(--primary);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

ul, ol {
  list-style: none;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  border: none;
  outline: none;
  background: none;
}

button {
  cursor: pointer;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
}

h1 { font-size: 3.5rem; }
h2 { font-size: 2.2rem; }
h3 { font-size: 1.3rem; }

/* === UTILITY === */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 100px 0;
}

.section--surface {
  background-color: var(--surface);
}

.section--accent {
  background-color: var(--accent);
}

.btn {
  display: inline-block;
  padding: 14px 32px;
  border-radius: var(--radius);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.95rem;
  transition: background-color var(--transition), color var(--transition), transform var(--transition), box-shadow var(--transition);
  text-align: center;
  white-space: nowrap;
}

.btn--primary {
  background-color: var(--accent);
  color: #FFFFFF;
}

.btn--primary:hover {
  background-color: #1A6FE0;
  color: #FFFFFF;
}

.btn--outline {
  border: 1px solid var(--text);
  color: var(--text);
  background: transparent;
}

.btn--outline:hover {
  background-color: var(--text);
  color: var(--primary);
}

.btn--white {
  background-color: var(--text);
  color: var(--primary);
}

.btn--white:hover {
  background-color: rgba(255, 255, 255, 0.9);
}

.text-link {
  color: var(--accent);
  font-weight: 500;
  transition: color var(--transition);
}

.text-link:hover {
  color: #58A6FF;
}

.section-title {
  font-size: 2.2rem;
  margin-bottom: 60px;
  text-align: center;
}

.text-muted {
  color: var(--text-muted);
}

/* === FADE UP ANIMATION === */
.fade-up {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* === NAVBAR === */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 20px 0;
  transition: background-color var(--transition), padding var(--transition), box-shadow var(--transition);
}

.navbar.scrolled {
  background-color: rgba(15, 15, 15, 0.95);
  backdrop-filter: blur(10px);
  padding: 14px 0;
  box-shadow: 0 1px 0 var(--border);
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar__logo {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--text);
  letter-spacing: 2px;
}

.navbar__links {
  display: flex;
  align-items: center;
  gap: 36px;
}

.navbar__links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: #8B949E;
  position: relative;
  transition: color var(--transition);
}

.navbar__links .btn {
  color: #FFFFFF;
}

.navbar__links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--accent);
  transition: width 0.3s ease;
}

.navbar__links a:hover,
.navbar__links a.active {
  color: var(--text);
}

.navbar__links a:hover::after,
.navbar__links a.active::after {
  width: 100%;
}

.navbar__cta {
  margin-left: 12px;
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 28px;
  height: 28px;
  cursor: pointer;
  position: relative;
  z-index: 1001;
}

.hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--text);
  transition: transform var(--transition), opacity var(--transition);
}

.hamburger.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile menu */
.mobile-menu {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(15, 15, 15, 0.98);
  z-index: 999;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 32px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.mobile-menu.open {
  opacity: 1;
  pointer-events: all;
}

.mobile-menu a {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text);
  transition: color var(--transition);
}

.mobile-menu a:hover {
  color: var(--accent);
}

/* === HERO === */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 140px 0 100px;
}

.hero__content {
  max-width: 700px;
}

.hero__content h1 {
  margin-bottom: 24px;
}

.hero__content p {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 40px;
  max-width: 560px;
}

.hero__buttons {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 48px;
}

.hero__stats {
  border-top: 1px solid var(--border);
  padding-top: 32px;
  display: flex;
  gap: 48px;
}

.hero__stat {
  text-align: left;
}

.hero__stat-number {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
}

.hero__stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* === TRUST BAR === */
.trust-bar {
  padding: 60px 0;
  background-color: var(--surface);
  overflow: hidden;
}

.trust-bar__title {
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 40px;
}

.trust-bar__track {
  display: flex;
  animation: marquee 30s linear infinite;
  width: max-content;
  will-change: transform;
}

.trust-bar__logos {
  display: flex;
  gap: 60px;
  align-items: center;
  padding: 0 30px;
  flex-shrink: 0;
}

.trust-bar__logos span {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--text);
  opacity: 0.4;
  white-space: nowrap;
  user-select: none;
}

@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

html[dir="rtl"] .trust-bar__track {
  animation: marquee-rtl 30s linear infinite;
}

@keyframes marquee-rtl {
  0% { transform: translateX(0); }
  100% { transform: translateX(50%); }
}

/* === SERVICES OVERVIEW === */

/* === TECH STACK ANIMATION === */
.tech-stack {
  padding: 80px 0 60px;
  overflow: hidden;
  background: linear-gradient(180deg, var(--primary) 0%, var(--surface) 50%, var(--primary) 100%);
}

.tech-stack__title {
  text-align: center;
  font-size: 2rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
}

.tech-stack__subtitle {
  text-align: center;
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 520px;
  margin: 0 auto 48px;
}

.tech-stack__row {
  margin-bottom: 20px;
}

.tech-stack__track {
  display: flex;
  width: max-content;
  animation: tech-scroll 35s linear infinite;
  will-change: transform;
}

.tech-stack__track--reverse {
  animation: tech-scroll-reverse 40s linear infinite;
}

.tech-stack__items {
  display: flex;
  gap: 16px;
  padding: 0 8px;
  flex-shrink: 0;
}

.tech-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 24px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  white-space: nowrap;
  transition: background 0.3s ease, border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.tech-item:hover {
  background: rgba(47, 129, 247, 0.12);
  border-color: rgba(47, 129, 247, 0.35);
  transform: translateY(-3px);
  box-shadow: 0 4px 20px rgba(47, 129, 247, 0.15), 0 0 40px rgba(47, 129, 247, 0.06);
}

.tech-item__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  filter: drop-shadow(0 0 3px rgba(255, 255, 255, 0.1));
  transition: filter 0.3s ease, transform 0.3s ease;
}

.tech-item__icon i {
  font-size: 1.6rem;
  line-height: 1;
}

.tech-item:hover .tech-item__icon {
  filter: drop-shadow(0 0 8px rgba(47, 129, 247, 0.4)) brightness(1.15);
  transform: scale(1.1);
}

.tech-item__name {
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text);
  opacity: 0.85;
  letter-spacing: 0.01em;
}

.tech-item:hover .tech-item__name {
  opacity: 1;
  color: #fff;
}

@keyframes tech-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

@keyframes tech-scroll-reverse {
  0% { transform: translateX(-50%); }
  100% { transform: translateX(0); }
}

html[dir="rtl"] .tech-stack__track {
  animation: tech-scroll-rtl 35s linear infinite;
}
html[dir="rtl"] .tech-stack__track--reverse {
  animation: tech-scroll-reverse-rtl 40s linear infinite;
}
@keyframes tech-scroll-rtl {
  0% { transform: translateX(0); }
  100% { transform: translateX(50%); }
}
@keyframes tech-scroll-reverse-rtl {
  0% { transform: translateX(50%); }
  100% { transform: translateX(0); }
}

/* === SERVICES OVERVIEW === */
.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.service-card {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px;
  position: relative;
  transition: transform var(--transition), box-shadow var(--transition);
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.service-card__number {
  font-family: var(--font-heading);
  font-size: 3rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.06);
  line-height: 1;
  margin-bottom: 20px;
}

.service-card h3 {
  margin-bottom: 12px;
}

.service-card p {
  color: var(--text-muted);
  margin-bottom: 20px;
  font-size: 0.95rem;
}

.service-card .text-link {
  font-size: 0.9rem;
}

/* === HOW IT WORKS === */
.steps {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  position: relative;
}

.steps::before {
  content: '';
  position: absolute;
  top: 40px;
  left: calc(16.66% + 12px);
  right: calc(16.66% + 12px);
  height: 1px;
  background-color: var(--border);
}

.step {
  flex: 1;
  text-align: center;
  position: relative;
}

.step__number {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 20px;
  display: inline-block;
  position: relative;
  z-index: 1;
  background-color: var(--primary);
  padding: 0 16px;
}

.section--surface .step__number {
  background-color: var(--surface);
}

.step h3 {
  margin-bottom: 10px;
}

.step p {
  color: var(--text-muted);
  font-size: 0.9rem;
  max-width: 280px;
  margin: 0 auto;
}

/* === CASE STUDIES PREVIEW === */
.case-studies-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 48px;
}

.case-card {
  background-color: var(--primary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px;
  transition: transform var(--transition), box-shadow var(--transition);
}

.case-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.case-card__tag {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.case-card__stat {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--accent);
}

.case-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 20px;
}

.case-studies__cta {
  text-align: center;
}

/* === TESTIMONIALS === */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.testimonial-card {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px;
  transition: transform var(--transition), box-shadow var(--transition);
}

.testimonial-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.testimonial-card__stars {
  color: var(--accent);
  font-size: 1.1rem;
  margin-bottom: 20px;
  letter-spacing: 2px;
}

.testimonial-card__quote {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 24px;
  font-style: italic;
  line-height: 1.8;
}

.testimonial-card__name {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.95rem;
}

.testimonial-card__role {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* === ABOUT TEASER === */
.about-teaser {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.about-teaser__text p {
  color: var(--text-muted);
  margin-bottom: 32px;
  font-size: 1.05rem;
}

.about-teaser__list {
  margin-bottom: 32px;
}

.about-teaser__list li {
  color: var(--text-muted);
  margin-bottom: 10px;
  font-size: 0.95rem;
}

.about-teaser__decoration {
  display: flex;
  align-items: center;
  justify-content: center;
}

.about-teaser__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  width: 100%;
}

.about-teaser__block {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px 24px;
  text-align: center;
}

.about-teaser__block:nth-child(2) {
  transform: translateY(24px);
}

.about-teaser__block:nth-child(3) {
  transform: translateY(-24px);
}

.about-teaser__block-number {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 8px;
}

.about-teaser__block-label {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* === URGENCY BANNER === */
.urgency {
  text-align: center;
  padding: 80px 0;
}

.urgency h2 {
  margin-bottom: 16px;
}

.urgency p {
  margin-bottom: 32px;
  opacity: 0.85;
}

/* === FOOTER === */
.footer {
  background-color: var(--surface);
  padding: 80px 0 0;
}

.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 60px;
  margin-bottom: 60px;
}

.footer__brand {
  max-width: 300px;
}

.footer__logo {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: 2px;
  margin-bottom: 16px;
}

.footer__tagline {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer__heading {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.footer__links li {
  margin-bottom: 10px;
}

.footer__links a {
  color: var(--text-muted);
  font-size: 0.9rem;
  transition: color var(--transition);
}

.footer__links a:hover {
  color: var(--text);
}

.footer__contact-item {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 10px;
}

.footer__bar {
  border-top: 1px solid var(--border);
  padding: 24px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.footer__bar-links {
  display: flex;
  gap: 24px;
}

.footer__bar-links a {
  color: var(--text-muted);
  transition: color var(--transition);
}

.footer__bar-links a:hover {
  color: var(--text);
}

/* === PAGE HERO === */
.page-hero {
  padding: 180px 0 100px;
  text-align: center;
}

.page-hero h1 {
  margin-bottom: 20px;
}

.page-hero p {
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 560px;
  margin: 0 auto;
}

/* === SERVICES PAGE === */
.service-block {
  padding: 80px 0;
  border-bottom: 1px solid var(--border);
}

.service-block:last-child {
  border-bottom: none;
}

.service-block__header {
  display: flex;
  align-items: flex-start;
  gap: 40px;
  margin-bottom: 32px;
}

.service-block__number {
  font-family: var(--font-heading);
  font-size: 5rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.05);
  line-height: 1;
  flex-shrink: 0;
}

.service-block__content {
  flex: 1;
}

.service-block__content h2 {
  margin-bottom: 20px;
}

.service-block__content > p {
  color: var(--text-muted);
  font-size: 1rem;
  margin-bottom: 32px;
  max-width: 640px;
}

.service-block__includes h4 {
  font-family: var(--font-heading);
  font-weight: 600;
  margin-bottom: 16px;
}

.service-block__includes ul {
  margin-bottom: 24px;
}

.service-block__includes li {
  color: var(--text-muted);
  margin-bottom: 8px;
  font-size: 0.95rem;
}

.service-block__audience {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-style: italic;
  margin-bottom: 32px;
}

.services-bottom {
  text-align: center;
  padding: 80px 0;
}

.services-bottom p {
  color: var(--text-muted);
  margin-bottom: 24px;
  font-size: 1.1rem;
}

/* === WORK PAGE === */
.work-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 80px;
}

.work-card {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px;
  transition: transform var(--transition), box-shadow var(--transition);
}

.work-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.work-card__tag {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--accent);
  margin-bottom: 16px;
}

.work-card h3 {
  margin-bottom: 6px;
}

.work-card__industry {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.work-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 16px;
}

.work-card__result {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--accent);
  margin-bottom: 16px;
}

.work-cta {
  text-align: center;
  background-color: var(--surface);
  border-radius: var(--radius);
  padding: 60px;
  border: 1px solid var(--border);
}

.work-cta h2 {
  margin-bottom: 8px;
}

.work-cta p {
  color: var(--text-muted);
  margin-bottom: 32px;
}

/* === ABOUT PAGE === */
.about-story {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}

.about-story p {
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.9;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.team-card {
  text-align: center;
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px 24px;
  transition: transform var(--transition), box-shadow var(--transition);
}

.team-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.team-card__initials {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background-color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.3rem;
  margin: 0 auto 20px;
}

.team-card__name {
  font-family: var(--font-heading);
  font-weight: 600;
  margin-bottom: 4px;
}

.team-card__role {
  font-size: 0.8rem;
  color: var(--accent);
  margin-bottom: 12px;
}

.team-card__bio {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.values-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.value-card {
  background-color: var(--primary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px;
  transition: transform var(--transition), box-shadow var(--transition);
}

.value-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.value-card__number {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.06);
  margin-bottom: 16px;
}

.value-card h3 {
  margin-bottom: 10px;
}

.value-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.stats-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  text-align: center;
}

.stat-item__number {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 8px;
}

.stat-item__label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* === CONTACT PAGE === */
.contact-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 60px;
  align-items: start;
}

.form-group {
  margin-bottom: 24px;
}

.form-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 8px;
  color: var(--text);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 14px 16px;
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 0.95rem;
  transition: border-color var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--accent);
}

.form-group input.error,
.form-group select.error,
.form-group textarea.error {
  border-color: #EF4444;
}

.form-group .error-message {
  font-size: 0.8rem;
  color: #EF4444;
  margin-top: 6px;
  display: none;
}

.form-group .error-message.show {
  display: block;
}

.form-group select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7' viewBox='0 0 12 7'%3E%3Cpath fill='rgba(255,255,255,0.5)' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
  cursor: pointer;
}

.form-group select option {
  background-color: var(--surface);
  color: var(--text);
}

.form-group textarea {
  min-height: 140px;
  resize: vertical;
}

/* intl-tel-input dark theme */
.iti {
  width: 100%;
  direction: ltr !important;
  --iti-border-color: rgba(255, 255, 255, 0.08);
  --iti-hover-color: rgba(47, 129, 247, 0.12);
  --iti-path-flags-1x: url('https://cdn.jsdelivr.net/npm/intl-tel-input@24.6.0/build/img/flags.webp');
  --iti-path-flags-2x: url('https://cdn.jsdelivr.net/npm/intl-tel-input@24.6.0/build/img/flags@2x.webp');
  --iti-path-globe-1x: url('https://cdn.jsdelivr.net/npm/intl-tel-input@24.6.0/build/img/globe.webp');
  --iti-path-globe-2x: url('https://cdn.jsdelivr.net/npm/intl-tel-input@24.6.0/build/img/globe@2x.webp');
}

/* Force LTR layout so flag is always on the left */
.iti * {
  direction: ltr !important;
}

/* Selected flag area - always on left */
.iti .iti__selected-country-primary {
  background: rgba(255, 255, 255, 0.04) !important;
  border-radius: 10px 0 0 10px;
  padding: 0 12px !important;
  transition: background 0.2s ease;
}

.iti .iti__selected-country-primary:hover {
  background: rgba(255, 255, 255, 0.08) !important;
}

.iti .iti__selected-dial-code {
  color: #E6EDF3 !important;
  font-size: 0.95rem;
  font-weight: 500;
  margin-left: 6px;
}

.iti .iti__arrow {
  border-top-color: #7D8590 !important;
  margin-left: 8px;
}

.iti .iti__arrow--up {
  border-bottom-color: #7D8590 !important;
}

/* Dropdown */
.iti .iti__dropdown-content {
  background: #161B22 !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 12px !important;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.05) !important;
  overflow: hidden;
  margin-top: 6px;
}

.iti .iti__search-input {
  background: #0D1117 !important;
  color: #E6EDF3 !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 8px !important;
  padding: 10px 14px 10px 36px !important;
  font-size: 0.9rem !important;
  margin: 10px !important;
  width: calc(100% - 20px) !important;
  box-sizing: border-box !important;
  outline: none !important;
  transition: border-color 0.2s ease;
}

.iti .iti__search-input:focus {
  border-color: #2F81F7 !important;
}

.iti .iti__search-input::placeholder {
  color: #7D8590 !important;
}

/* Country list */
.iti .iti__country-list {
  background: transparent !important;
  border: none !important;
  max-height: 260px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.1) transparent;
}

.iti .iti__country-list::-webkit-scrollbar {
  width: 6px;
}

.iti .iti__country-list::-webkit-scrollbar-track {
  background: transparent;
}

.iti .iti__country-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 3px;
}

.iti .iti__country {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px !important;
  color: #E6EDF3;
  font-size: 0.9rem;
  transition: background 0.15s ease;
  outline: none !important;
}

.iti .iti__country:hover,
.iti .iti__country.iti__highlight {
  background: rgba(47, 129, 247, 0.12) !important;
}

.iti .iti__country-name {
  color: #E6EDF3;
  font-size: 0.9rem;
}

.iti .iti__highlight .iti__country-name {
  color: #58A6FF;
}

.iti .iti__dial-code {
  color: #7D8590;
  font-size: 0.85rem;
}

.iti .iti__flag-box {
  margin-right: 0;
}

/* Divider for preferred countries */
.iti .iti__divider {
  border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
  margin: 4px 0;
}

/* Input inside ITI */
.iti input[type="tel"] {
  width: 100% !important;
  padding: 14px 16px 14px 100px !important;
  background-color: var(--surface) !important;
  border: 1px solid var(--border) !important;
  border-radius: 10px !important;
  color: var(--text) !important;
  font-size: 0.95rem !important;
  font-family: var(--font-body) !important;
  transition: border-color 0.2s ease !important;
  outline: none !important;
}

.iti input[type="tel"]:focus {
  border-color: var(--accent) !important;
}

.iti input[type="tel"]::placeholder {
  color: #7D8590 !important;
}

.checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.checkbox-item {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.checkbox-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
  cursor: pointer;
}

.form-success {
  display: none;
  padding: 20px;
  background-color: rgba(79, 70, 229, 0.1);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  text-align: center;
  margin-top: 20px;
}

.form-success.show {
  display: block;
}

.contact-info {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px;
}

.contact-info__item {
  margin-bottom: 24px;
}

.contact-info__item h4 {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 8px;
}

.contact-info__item p,
.contact-info__item a {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.contact-info__item a:hover {
  color: var(--accent);
}

.whatsapp-btn {
  display: inline-block;
  padding: 12px 28px;
  background-color: #25D366;
  color: var(--text);
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.9rem;
  transition: background-color var(--transition);
}

.whatsapp-btn:hover {
  background-color: #20BD5A;
}

.contact-info__trust {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.contact-info__trust li {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 10px;
}

/* === FAQ === */
.faq-list {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  border-bottom: 1px solid var(--border);
}

.faq-item:first-child {
  border-top: 1px solid var(--border);
}

.faq-question {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 0;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1rem;
  color: var(--text);
  cursor: pointer;
  text-align: left;
  background: none;
  border: none;
  transition: color var(--transition);
}

.faq-question:hover {
  color: var(--accent);
}

.faq-question__icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  position: relative;
  margin-left: 16px;
}

.faq-question__icon::before,
.faq-question__icon::after {
  content: '';
  position: absolute;
  background-color: var(--text);
  transition: transform 0.3s ease;
}

.faq-question__icon::before {
  width: 100%;
  height: 2px;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
}

.faq-question__icon::after {
  width: 2px;
  height: 100%;
  left: 50%;
  top: 0;
  transform: translateX(-50%);
}

.faq-item.active .faq-question__icon::after {
  transform: translateX(-50%) rotate(90deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.faq-answer p {
  padding-bottom: 24px;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.8;
}

/* === BACK TO TOP === */
.back-to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 48px;
  height: 48px;
  background-color: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition), background-color var(--transition);
  z-index: 900;
  border: none;
}

.back-to-top.show {
  opacity: 1;
  pointer-events: all;
}

.back-to-top:hover {
  background-color: #1A6FE0;
}

.back-to-top__arrow {
  width: 14px;
  height: 14px;
  border-top: 2px solid var(--text);
  border-right: 2px solid var(--text);
  transform: rotate(-45deg);
  margin-top: 4px;
}

/* === FLOATING WHATSAPP === */
.floating-whatsapp {
  position: fixed;
  bottom: 32px;
  right: 96px;
  background-color: #25D366;
  color: var(--text);
  padding: 14px 24px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  z-index: 900;
  transition: background-color var(--transition), transform var(--transition);
  border: none;
  font-family: var(--font-body);
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.3);
}

.floating-whatsapp:hover {
  background-color: #20BD5A;
  transform: translateY(-2px);
}

/* === LOCALE TRIGGER (Globe button) === */
.locale-trigger {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: border-color var(--transition), color var(--transition);
}
.locale-trigger:hover {
  border-color: var(--accent);
  color: var(--text);
}

/* === LOCALE MODAL === */
.locale-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.locale-modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.locale-modal {
  background: var(--surface);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 14px;
  width: 90%;
  max-width: 350px;
  padding: 28px 24px 24px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  transform: translateY(16px) scale(0.97);
  transition: transform 0.25s ease;
}
.locale-modal-overlay.open .locale-modal {
  transform: translateY(0) scale(1);
}

.locale-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}
.locale-modal__header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}
.locale-modal__header-left svg {
  color: var(--text);
  flex-shrink: 0;
}
.locale-modal__title {
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
}
.locale-modal__close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.4rem;
  line-height: 1;
  padding: 4px;
  transition: color var(--transition);
}
.locale-modal__close:hover {
  color: var(--text);
}

.locale-modal__label {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 8px;
  font-weight: 500;
}

.locale-modal__select {
  width: 100%;
  padding: 12px 14px;
  background: #0d1117;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  color: var(--text);
  font-size: 0.9rem;
  font-family: var(--font-body);
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237D8590' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  cursor: pointer;
  margin-bottom: 20px;
  transition: border-color var(--transition);
}
.locale-modal__select:focus {
  outline: none;
  border-color: var(--accent);
}
.locale-modal__select option {
  background: #0d1117;
  color: var(--text);
}

.locale-modal__save {
  width: 100%;
  padding: 14px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer;
  transition: background var(--transition);
  margin-bottom: 10px;
}
.locale-modal__save:hover {
  background: #1A6FE0;
}
.locale-modal__cancel {
  width: 100%;
  padding: 12px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-family: var(--font-body);
  cursor: pointer;
  transition: color var(--transition);
}
.locale-modal__cancel:hover {
  color: var(--text);
}

/* === RTL SUPPORT (Arabic) === */
html[dir="rtl"] body {
  text-align: right;
}

html[dir="rtl"] .navbar .container {
  flex-direction: row-reverse;
}

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

html[dir="rtl"] .navbar__links a::after {
  left: auto;
  right: 0;
}

html[dir="rtl"] .hero__content {
  direction: rtl;
}

html[dir="rtl"] .hero__buttons {
  flex-direction: row-reverse;
  justify-content: flex-end;
}

html[dir="rtl"] .hero__stats {
  direction: rtl;
}

html[dir="rtl"] .about-teaser {
  direction: rtl;
}

html[dir="rtl"] .footer__grid {
  direction: rtl;
}

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

html[dir="rtl"] .service-block__header {
  flex-direction: row-reverse;
}

html[dir="rtl"] .service-block__content {
  text-align: right;
}

html[dir="rtl"] .contact-grid {
  direction: rtl;
}

html[dir="rtl"] .form-group input,
html[dir="rtl"] .form-group select,
html[dir="rtl"] .form-group textarea {
  text-align: right;
}

html[dir="rtl"] .form-group input[type="tel"] {
  text-align: left !important;
}

html[dir="rtl"] .form-group select {
  background-position: left 16px center;
  padding-left: 40px;
  padding-right: 16px;
}

/* Phone LTR wrapper - ensures flag always on left */
.phone-ltr-wrap {
  direction: ltr !important;
  width: 100%;
}

html[dir="rtl"] .phone-ltr-wrap {
  direction: ltr !important;
  text-align: left;
}

html[dir="rtl"] .phone-ltr-wrap .iti {
  direction: ltr !important;
  text-align: left;
  unicode-bidi: isolate;
}

/* Override library [dir=rtl] rules inside our LTR wrapper */
html[dir="rtl"] .phone-ltr-wrap .iti__arrow {
  margin-left: var(--iti-arrow-padding, 4px) !important;
  margin-right: 0 !important;
}

html[dir="rtl"] .phone-ltr-wrap .iti__country-list .iti__flag,
html[dir="rtl"] .phone-ltr-wrap .iti__country-name {
  margin-right: var(--iti-spacer-horizontal, 8px) !important;
  margin-left: 0 !important;
}

html[dir="rtl"] .phone-ltr-wrap .iti .iti__selected-dial-code {
  margin-left: 4px !important;
  margin-right: 0 !important;
}

/* Force country container to left side in RTL */
html[dir="rtl"] .phone-ltr-wrap .iti__country-container {
  left: 0 !important;
  right: auto !important;
}

html[dir="rtl"] .iti {
  direction: ltr !important;
  text-align: left;
}

html[dir="rtl"] .iti input[type="tel"] {
  text-align: left !important;
  direction: ltr !important;
}

html[dir="rtl"] .iti .iti__selected-country,
html[dir="rtl"] .iti .iti__selected-country-primary {
  direction: ltr !important;
  border-radius: 10px 0 0 10px !important;
  left: 0 !important;
  right: auto !important;
}

html[dir="rtl"] .iti .iti__country {
  direction: ltr !important;
  text-align: left;
  flex-direction: row !important;
}

html[dir="rtl"] .iti .iti__search-input {
  direction: ltr !important;
  text-align: left;
}

html[dir="rtl"] .iti .iti__dropdown-content {
  left: 0 !important;
  right: auto !important;
  direction: ltr !important;
}

html[dir="rtl"] .iti .iti__country-list {
  direction: ltr !important;
}

html[dir="rtl"] .faq-question {
  flex-direction: row-reverse;
  text-align: right;
}

html[dir="rtl"] .faq-question__icon {
  margin-left: 0;
  margin-right: 16px;
}

html[dir="rtl"] .step {
  text-align: center;
}

html[dir="rtl"] .locale-modal__select {
  background-position: left 14px center;
  text-align: right;
}

html[dir="rtl"] .floating-whatsapp {
  right: auto;
  left: 96px;
}

html[dir="rtl"] .back-to-top {
  right: auto;
  left: 32px;
}

/* ============================================
   RESPONSIVE — TABLET (1024px)
   ============================================ */
@media (max-width: 1024px) {
  h1 { font-size: 2.8rem; }
  h2 { font-size: 1.8rem; }

  .services-grid {
    grid-template-columns: 1fr;
  }

  .case-studies-grid,
  .testimonials-grid {
    grid-template-columns: 1fr 1fr;
  }

  .case-studies-grid > :last-child {
    grid-column: span 2;
  }

  .about-teaser {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .footer__grid {
    grid-template-columns: 1fr 1fr;
    gap: 40px;
  }

  .footer__brand {
    grid-column: span 2;
  }

  .work-grid {
    grid-template-columns: 1fr 1fr;
  }

  .team-grid {
    grid-template-columns: 1fr 1fr;
  }

  .values-grid {
    grid-template-columns: 1fr 1fr;
  }

  .stats-bar {
    grid-template-columns: 1fr 1fr;
    gap: 40px;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   RESPONSIVE — MOBILE (768px)
   ============================================ */
@media (max-width: 768px) {
  h1 { font-size: 2.2rem; }
  h2 { font-size: 1.5rem; }
  h3 { font-size: 1.1rem; }

  .section {
    padding: 60px 0;
  }

  .section-title {
    margin-bottom: 40px;
  }

  .navbar__links {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  .mobile-menu {
    display: flex;
  }

  .hero {
    padding: 120px 0 60px;
    min-height: auto;
  }

  .hero__content h1 {
    font-size: 2rem;
  }

  .hero__stats {
    flex-direction: column;
    gap: 20px;
  }

  .steps {
    flex-direction: column;
    gap: 40px;
  }

  .steps::before {
    display: none;
  }

  .step {
    text-align: left;
  }

  .step__number {
    padding: 0;
  }

  .case-studies-grid {
    grid-template-columns: 1fr;
  }

  .case-studies-grid > :last-child {
    grid-column: span 1;
  }

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

  .about-teaser__grid {
    grid-template-columns: 1fr;
  }

  .about-teaser__block:nth-child(2),
  .about-teaser__block:nth-child(3) {
    transform: none;
  }

  .footer__grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .footer__brand {
    grid-column: span 1;
  }

  .footer__bar {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }

  .page-hero {
    padding: 140px 0 60px;
  }

  .page-hero h1 {
    font-size: 2rem;
  }

  .service-block__header {
    flex-direction: column;
    gap: 16px;
  }

  .service-block__number {
    font-size: 3rem;
  }

  .work-grid {
    grid-template-columns: 1fr;
  }

  .team-grid {
    grid-template-columns: 1fr;
  }

  .values-grid {
    grid-template-columns: 1fr;
  }

  .stats-bar {
    grid-template-columns: 1fr 1fr;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }

  .floating-whatsapp {
    bottom: 20px;
    right: 76px;
    padding: 12px 20px;
    font-size: 0.8rem;
  }

  .back-to-top {
    bottom: 20px;
    right: 20px;
    width: 42px;
    height: 42px;
  }

  html[dir="rtl"] .floating-whatsapp {
    right: auto;
    left: 76px;
  }

  html[dir="rtl"] .back-to-top {
    right: auto;
    left: 20px;
  }

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

  html[dir="rtl"] .footer__bar {
    flex-direction: column;
  }
}
