/* ===== Reset & Base ===== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #bf0000;
  --primary-dark: #8f0000;
  --primary-soft: #fff1f1;
  --primary-soft-strong: #ffdede;
  --secondary: #ff7b6f;
  --tertiary: #221f20;
  --surface: #ffffff;
  --surface-muted: #fff8f8;
  --surface-dark: #171214;
  --text-dark: #181818;
  --text-default: #5f5557;
  --text-light: #fff;
  --grey-bg: #faf7f7;
  --grey-200: #f1e7e7;
  --grey-300: #e4d6d6;
  --grey-500: #a68c8f;
  --shadow-soft: 0 18px 50px rgba(33, 14, 15, 0.08);
  --shadow-strong: 0 24px 70px rgba(33, 14, 15, 0.14);
  --font-primary: 'Poppins', sans-serif;
  --font-secondary: 'Overpass', sans-serif;
  --font-tertiary: 'PT Serif', serif;
  /* Fixed header: .site-header padding (20+20) + .logo img (40) */
  --header-height: 80px;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
}

body {
  font-family: var(--font-primary);
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-default);
  background: #fffdfd;
  overflow-x: hidden;
}

h2 {
  color: var(--primary);
}

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

a {
  text-decoration: none;
  color: inherit;
  transition: color 0.3s, opacity 0.3s;
}

ul {
  list-style: none;
}

.container {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ===== Utility ===== */
.section-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 12px;
}

.section-label.light {
  color: rgba(255,255,255,0.72);
}

.section-title {
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 20px;
  color: var(--text-dark);
}

.divider {
  width: 72px;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary), rgba(191,0,0,0.1));
  margin: 22px 0;
  opacity: 1;
}

.divider.center {
  margin: 20px auto;
}

.serif-text {
  font-family: var(--font-tertiary);
  font-style: italic;
  font-size: 18px;
  color: var(--text-dark);
  line-height: 1.6;
  margin-bottom: 15px;
}

.stroke-text {
  font-family: var(--font-secondary);
  font-size: clamp(60px, 10vw, 120px);
  font-weight: 900;
  color: transparent;
  -webkit-text-stroke: 1px rgba(191,0,0,0.12);
  position: absolute;
  top: -30px;
  left: -10px;
  pointer-events: none;
  white-space: nowrap;
  line-height: 1;
  z-index: 0;
}

.btn {
  display: inline-block;
  padding: 14px 28px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.3s, background 0.3s, color 0.3s, border-color 0.3s, box-shadow 0.3s;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: var(--text-light);
  box-shadow: 0 16px 34px rgba(191,0,0,0.22);
}

.btn-primary::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.18), transparent 65%);
  opacity: 0;
  transition: opacity 0.3s;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 42px rgba(191,0,0,0.28);
}

.btn-light {
  background: rgba(255,255,255,0.96);
  color: var(--primary);
  border-color: rgba(255,255,255,0.18);
  box-shadow: 0 16px 34px rgba(0,0,0,0.12);
}

.btn-light::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.45), rgba(255,255,255,0));
  opacity: 0;
  transition: opacity 0.3s;
}

.btn-primary:hover::after,
.btn-light:hover::after {
  opacity: 1;
}

.btn-light:hover {
  transform: translateY(-2px);
  background: #fff;
}

/* ===== Header ===== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 20px 0;
  transition: all 0.4s;
  background: var(--primary);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.12);
}

.site-header.scrolled {
  background: var(--primary);
  padding: 10px 0;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

/* Mobile: don’t animate header padding — avoids a gap between shrunk bar and drawer when JS only ran once per scroll */
@media (max-width: 992px) {
  .site-header {
    transition: box-shadow 0.4s ease, background-color 0.4s ease;
  }
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  line-height: 0;
}

.logo img {
  height: 40px;
  width: auto;
  display: block;
}

.main-nav ul {
  display: flex;
  gap: 30px;
}

.main-nav a {
  color: rgba(255,255,255,0.85);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 5px 0;
  position: relative;
  transition: color 0.3s;
}

.main-nav a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: #fff;
  transition: width 0.3s;
}

.main-nav a:hover,
.main-nav a.active {
  color: #fff;
}

.site-header.scrolled .main-nav a:hover,
.site-header.scrolled .main-nav a.active {
  color: #fff;
}

.main-nav a:hover::after,
.main-nav a.active::after {
  width: 100%;
}

.main-nav a i {
  font-size: 8px;
  margin-left: 4px;
}

.has-dropdown {
  position: relative;
}

.dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  background: rgba(255,255,255,0.98);
  min-width: 220px;
  padding: 12px 0;
  border: 1px solid var(--grey-200);
  border-radius: 16px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s;
  box-shadow: var(--shadow-soft);
}

.has-dropdown:hover .dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown li {
  padding: 0;
}

.dropdown a {
  display: block;
  padding: 8px 20px;
  font-size: 12px;
  color: var(--text-dark);
}

.dropdown a::after {
  display: none;
}

.dropdown a:hover {
  background: var(--primary-soft);
  color: var(--primary);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 22px;
  cursor: pointer;
  transition: color 0.3s;
  line-height: 1;
  padding: 8px;
  margin: -8px -8px -8px 0;
}

.nav-toggle .nav-toggle-close {
  display: none;
}

.site-header.menu-open .nav-toggle .fa-bars {
  display: none;
}

.site-header.menu-open .nav-toggle .nav-toggle-close {
  display: block;
}

.nav-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10020;
  background: rgba(0, 0, 0, 0.45);
  -webkit-tap-highlight-color: transparent;
}

.nav-backdrop.is-active {
  display: block;
}

@media (min-width: 993px) {
  .nav-backdrop {
    display: none !important;
  }
}

@media (max-width: 992px) {
  body.nav-drawer-open {
    overflow: hidden;
    overscroll-behavior: none;
    touch-action: none;
  }
}

.site-header.scrolled .nav-toggle {
  color: #fff;
}

/* ===== Hero ===== */
.hero {
  position: relative;
  min-height: 400px;
  height: clamp(400px, 58vh, 600px);
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
}

.hero-motion {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  background: #12090a;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at top left, rgba(191,0,0,0.26), transparent 35%),
    linear-gradient(180deg, rgba(16,12,13,0.74), rgba(16,12,13,0.84));
}

.hero-content {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  padding-top: var(--header-height);
  box-sizing: border-box;
  z-index: 2;
}

.hero-content .container {
  position: relative;
}

.hero-slide {
  display: none;
  max-width: 720px;
}

.hero-slide.active {
  display: block;
  animation: fadeInUp 0.8s ease;
}

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

.hero-title {
  font-size: clamp(48px, 8vw, 100px);
  font-weight: 900;
  color: #fff;
  line-height: 1;
  margin-bottom: 16px;
  text-shadow: 0 18px 40px rgba(0,0,0,0.35);
}

.hero-subtitle {
  font-size: clamp(18px, 3vw, 26px);
  font-weight: 600;
  letter-spacing: 0.06em;
  margin-bottom: 14px;
  color: rgba(255,255,255,0.88);
}

.hero-desc {
  font-size: 17px;
  color: rgba(255,255,255,0.78);
  margin-bottom: 36px;
  max-width: 560px;
}

.hero-nav {
  position: absolute;
  top: calc(var(--header-height) + (100% - var(--header-height)) * 0.5);
  transform: translateY(-50%);
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  padding: 0 30px;
  z-index: 3;
}

.hero-nav-btn {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.14);
  color: rgba(255,255,255,0.84);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 16px;
  transition: all 0.3s;
}

.hero-nav-btn:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* ===== Services Carousel ===== */
.services-carousel {
  padding: 56px 0 90px;
  margin-top: 0;
  position: relative;
  z-index: 5;
  background: linear-gradient(180deg, #fffdfd 0%, var(--surface-muted) 100%);
}

.services-track {
  display: flex;
  gap: 25px;
  will-change: transform;
}

.services-viewport {
  overflow: hidden;
}

.service-card {
  flex: 0 0 calc(33.333% - 17px);
  background: var(--surface);
  padding: 38px 30px;
  text-align: center;
  border: 1px solid rgba(191,0,0,0.08);
  border-radius: 24px;
  transition: transform 0.3s, border-color 0.3s;
}

.service-card:hover {
  transform: translateY(-8px);
  border-color: rgba(191,0,0,0.22);
}

.service-icon {
  width: 75px;
  height: 75px;
  margin: 0 auto 25px;
  color: var(--primary);
  background: linear-gradient(135deg, var(--primary-soft), rgba(191,0,0,0.02));
  border-radius: 20px;
  padding: 16px;
}

.service-icon svg {
  width: 100%;
  height: 100%;
}

.service-card h2 {
  font-size: 26px;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 15px;
  color: var(--text-dark);
}

.service-card p {
  font-size: 14px;
  color: var(--text-default);
  line-height: 1.7;
}

.carousel-nav {
  display: flex;
  gap: 8px;
  margin-top: 30px;
}

.carousel-btn {
  width: 40px;
  height: 40px;
  border: 1px solid rgba(191,0,0,0.12);
  background: #fff;
  color: var(--primary);
  cursor: pointer;
  font-size: 12px;
  border-radius: 50%;
  transition: all 0.3s;
}

.carousel-btn:hover {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 12px 24px rgba(191,0,0,0.18);
}

.carousel-btn.light {
  border-color: rgba(255,255,255,0.3);
  background: transparent;
  color: rgba(255,255,255,0.7);
}

.carousel-btn.light:hover {
  background: rgba(255,255,255,0.2);
  color: #fff;
}

.services-nav {
  justify-content: center;
}

/* ===== About Section ===== */
.about-section {
  padding: 110px 0;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.about-images {
  position: relative;
}

.about-img-main img {
  width: 85%;
  border-radius: 28px;
  box-shadow: var(--shadow-soft);
}

.about-img-overlay {
  position: absolute;
  bottom: -40px;
  right: -20px;
  width: 55%;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--shadow-strong);
}

.about-content {
  position: relative;
  padding-top: 30px;
}

.about-content p {
  margin-bottom: 15px;
}

.about-content .btn {
  margin-top: 15px;
}

/* ===== Logo Section ===== */
.logos-section {
  padding: 68px 0;
  border-top: 1px solid var(--grey-200);
  border-bottom: 1px solid var(--grey-200);
  background: var(--surface-muted);
}

.logos-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 20px;
  align-items: center;
  text-align: center;
}

.client-logo {
  font-family: var(--font-secondary);
  font-size: 22px;
  font-weight: 700;
  color: #ccc;
  letter-spacing: 3px;
  transition: color 0.3s;
}

.client-logo:hover {
  color: #999;
}

/* ===== Process Section ===== */
.process-section {
  overflow: hidden;
  background: var(--surface-dark);
}

.process-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  min-height: 500px;
}

.process-image {
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  min-height: 400px;
}

.process-content {
  background:
    radial-gradient(circle at top left, rgba(255,255,255,0.08), transparent 30%),
    linear-gradient(180deg, #c70808 0%, #8f0000 100%);
  padding: 60px 50px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.process-slide {
  display: none;
}

.process-slide.active {
  display: block;
  animation: fadeInUp 0.5s ease;
}

.process-number {
  font-family: var(--font-secondary);
  font-size: 64px;
  font-weight: 900;
  color: rgba(255,255,255,0.65);
  line-height: 1;
  display: block;
  margin-bottom: 10px;
}

.process-content h3 {
  font-size: 28px;
  font-weight: 800;
  color: #fff;
  letter-spacing: 3px;
  margin-bottom: 15px;
}

.process-content p {
  color: rgba(255,255,255,0.8);
  font-size: 14px;
  line-height: 1.8;
}

.process-nav {
  margin-top: 40px;
}

/* ===== Skills Section ===== */
.skills-section {
  padding: 110px 0;
  background: linear-gradient(180deg, #fff 0%, var(--surface-muted) 100%);
}

.skills-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 80px;
  align-items: start;
}

.skills-info {
  position: relative;
  padding-top: 30px;
}

.skills-info p {
  margin-bottom: 15px;
}

.skills-capabilities {
  padding-top: 30px;
}

.skills-capabilities .section-label {
  margin-bottom: 30px;
}

.capabilities-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.capability-card {
  background: #fff;
  border: 1px solid rgba(191,0,0,0.08);
  border-radius: 20px;
  padding: 24px 22px;
  box-shadow: var(--shadow-soft);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.capability-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-strong);
}

.capability-card h3 {
  font-size: 16px;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 8px;
}

.capability-card p {
  font-size: 13px;
  color: var(--text-default);
  line-height: 1.7;
  margin: 0;
}

/* ===== Counters ===== */
.counters-section {
  padding: 80px 0;
  border-top: 1px solid var(--grey-200);
  border-bottom: 1px solid var(--grey-200);
  background: #fff;
}

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

.counter-item {
  padding: 28px 20px;
  background: var(--surface-muted);
  border: 1px solid var(--grey-200);
  border-radius: 20px;
}

.counter-number {
  font-size: 48px;
  font-weight: 700;
  color: var(--primary);
  line-height: 1;
}

.counter-suffix {
  font-size: 36px;
  font-weight: 700;
  color: var(--primary);
}

.counter-item p {
  font-size: 13px;
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-top: 10px;
}

/* ===== Portfolio ===== */
.portfolio-section {
  padding: 80px 0;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0;
}

.portfolio-item {
  position: relative;
  overflow: hidden;
}

.portfolio-item.large {
  grid-row: span 1;
}

.portfolio-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}

.portfolio-item:hover img {
  transform: scale(1.05);
}

.portfolio-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s;
}

.portfolio-overlay i {
  color: #fff;
  font-size: 24px;
}

.portfolio-item:hover .portfolio-overlay {
  opacity: 1;
}

.lightbox-trigger {
  display: block;
  height: 100%;
}

/* ===== CTA Section ===== */
.cta-section {
  background:
    radial-gradient(circle at top right, rgba(255,255,255,0.08), transparent 28%),
    linear-gradient(135deg, #210e0f, #bf0000 82%);
  padding: 80px 0;
}

.cta-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
}

.cta-text .section-label {
  color: rgba(255,255,255,0.74);
}

.cta-text h2 {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 800;
  line-height: 1.2;
  color: #fff;
}

.cta-chat-hint {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 24px;
  max-width: 520px;
  font-size: 16px;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.9);
}

.cta-chat-hint .fa-whatsapp {
  flex-shrink: 0;
  margin-top: 3px;
  font-size: 22px;
  color: #25d366;
}

/* ===== FAQ Section ===== */
.faq-section {
  padding: 110px 0;
}

.faq-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 60px;
  align-items: start;
}

.faq-info {
  position: relative;
  padding-top: 30px;
}

.faq-info p {
  margin-bottom: 15px;
}

.faq-info .btn {
  margin-top: 15px;
}

.accordion-item {
  border: 1px solid var(--grey-200);
  border-radius: 18px;
  padding: 0 22px;
  margin-bottom: 14px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.accordion-header {
  width: 100%;
  padding: 20px 0;
  background: none;
  border: none;
  text-align: left;
  font-family: var(--font-primary);
  font-size: 16px;
  font-weight: 600;
  color: var(--text-dark);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: color 0.3s;
}

.accordion-header:hover {
  color: var(--primary);
}

.accordion-header i {
  font-size: 12px;
  transition: transform 0.3s;
  color: var(--primary);
}

.accordion-item.active .accordion-header i {
  transform: rotate(180deg);
}

.accordion-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.4s ease;
}

.accordion-item.active .accordion-body {
  max-height: 300px;
  padding-bottom: 20px;
}

.accordion-body p {
  font-size: 14px;
  line-height: 1.8;
  color: var(--text-default);
  padding-left: 15px;
  border-left: 2px solid rgba(191,0,0,0.22);
}

/* ===== Testimonials ===== */
.testimonials-section {
  padding: 100px 0;
  overflow: hidden;
}

.testimonials-inner {
  background: var(--text-dark);
  padding: 80px 0;
  text-align: center;
}

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

.testimonial-slide {
  display: none;
}

.testimonial-slide.active {
  display: block;
  animation: fadeInUp 0.5s ease;
}

.quote-icon {
  font-size: 30px;
  color: rgba(255,255,255,0.2);
  margin-bottom: 20px;
}

blockquote p {
  font-family: var(--font-tertiary);
  font-style: italic;
  font-size: 18px;
  color: rgba(255,255,255,0.8);
  line-height: 1.8;
  max-width: 700px;
  margin: 0 auto 25px;
}

cite {
  font-style: normal;
  font-weight: 700;
  font-size: 16px;
  color: #fff;
}

.testimonial-nav {
  justify-content: center;
  margin-top: 30px;
}

/* ===== Footer ===== */
.site-footer {
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.12), transparent 40%),
    linear-gradient(180deg, var(--primary) 0%, var(--primary-dark) 100%);
  padding-top: 70px;
  overflow-x: hidden;
  max-width: 100%;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 3fr) minmax(0, 3fr);
  gap: 30px;
  padding-bottom: 48px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.footer-col {
  min-width: 0;
}

.footer-col h5 {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 20px;
}

.footer-col p,
.footer-col a {
  font-size: 13px;
  color: rgba(255,255,255,0.72);
  line-height: 1.8;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.footer-col a:hover {
  color: var(--secondary);
}

.footer-col ul li {
  margin-bottom: 5px;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  padding: 30px 0;
  text-align: center;
}

.footer-bottom .footer-logo {
  display: block;
  width: fit-content;
  max-width: 100%;
  margin-inline: auto;
  margin-bottom: 12px;
  line-height: 0;
}

.footer-bottom .footer-logo img {
  height: 36px;
  width: auto;
  max-width: min(100%, 280px);
  margin-inline: auto;
  display: block;
}

.footer-bottom p {
  font-size: 13px;
  color: rgba(255,255,255,0.58);
}

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 36px;
    padding-bottom: 40px;
  }
}

/* ===== Chaty widget (third-party) — mobile / notched devices ===== */
@media (max-width: 992px) {
  .chaty-app-widget,
  [id^="chaty-app-widget-"] {
    z-index: 9999 !important;
    margin-bottom: env(safe-area-inset-bottom, 0px) !important;
    margin-right: env(safe-area-inset-right, 0px) !important;
    margin-left: env(safe-area-inset-left, 0px) !important;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
  }

  .chaty-app {
    max-width: calc(100vw - 24px - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px)) !important;
    box-sizing: border-box !important;
  }

  .chaty-app-outer-forms {
    max-height: calc(100vh - 96px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)) !important;
    max-height: calc(100dvh - 96px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)) !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
  }
}

/* ===== Lightbox ===== */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.9);
  z-index: 10200;
  display: none;
  align-items: center;
  justify-content: center;
}

.lightbox.active {
  display: flex;
}

.lightbox img {
  max-width: 90%;
  max-height: 90vh;
  object-fit: contain;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  background: none;
  border: none;
  color: #fff;
  font-size: 24px;
  cursor: pointer;
  padding: 15px;
  transition: opacity 0.3s;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
  opacity: 0.7;
}

.lightbox-close {
  top: 20px;
  right: 20px;
}

.lightbox-prev {
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-next {
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
}

/* ===== Mission & Vision ===== */
.mission-vision-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  padding: 20px 0;
}

.mv-item {
  text-align: center;
  padding: 34px 28px;
  background: #fff;
  border: 1px solid rgba(191,0,0,0.08);
  border-radius: 24px;
  box-shadow: var(--shadow-soft);
}

.mv-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(191,0,0,0.16);
  border-radius: 18px;
  background: var(--primary-soft);
  font-size: 22px;
  color: var(--primary);
}

.mv-item h3 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.mv-item p {
  font-size: 14px;
  line-height: 1.8;
  color: var(--text-default);
}

/* ===== Portfolio Header ===== */
.portfolio-header {
  text-align: center;
  margin-bottom: 40px;
}

.portfolio-overlay span {
  display: block;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-top: 10px;
}

.portfolio-overlay {
  flex-direction: column;
}

/* ===== Comparison Section ===== */
.comparison-section {
  padding: 100px 0;
  background: linear-gradient(180deg, var(--grey-bg) 0%, #fff 100%);
}

.comparison-header {
  text-align: center;
  position: relative;
  margin-bottom: 50px;
}

.comparison-header .stroke-text {
  left: 50%;
  transform: translateX(-50%);
  top: -40px;
}

.comparison-table-wrapper {
  overflow-x: auto;
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}

.comparison-table th {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  padding: 18px 24px;
  text-align: left;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.comparison-table td {
  padding: 18px 24px;
  font-size: 14px;
  border-bottom: 1px solid var(--grey-200);
  vertical-align: middle;
}

.competitor-name {
  font-weight: 600;
  color: var(--text-dark);
}

.resetrix-name {
  font-weight: 800;
  color: var(--primary);
  font-size: 16px;
}

.highlight-row {
  background: var(--primary-soft);
}

.highlight-row td {
  border-bottom: 3px solid rgba(191,0,0,0.28);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.badge i {
  font-size: 10px;
}

.badge-green {
  color: #1a8a5c;
  background: rgba(26, 138, 92, 0.1);
}

.badge-red {
  color: #c0392b;
  background: rgba(192, 57, 43, 0.1);
}

.badge-yellow {
  color: #b8860b;
  background: rgba(184, 134, 11, 0.1);
}

/* Comparison: card layout (mobile only; table from 768px up) */
.comparison-cards {
  display: none;
}

.comparison-card {
  background: #fff;
  border-radius: 20px;
  padding: 22px 20px;
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--grey-200);
}

.comparison-card--resetrix {
  background: var(--primary-soft);
  border: 1px solid rgba(191, 0, 0, 0.22);
  border-bottom: 3px solid rgba(191, 0, 0, 0.28);
}

.comparison-card__title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-dark);
  margin: 0 0 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--grey-200);
}

.comparison-card--resetrix .comparison-card__title {
  border-bottom-color: rgba(191, 0, 0, 0.2);
}

.comparison-card__title--resetrix {
  color: var(--primary);
  font-weight: 800;
  font-size: 18px;
}

.comparison-card__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.comparison-card__row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px 14px;
}

.comparison-card__label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-default);
  flex: 1 1 118px;
  min-width: 0;
  line-height: 1.4;
}

.comparison-card__row .badge {
  white-space: normal;
  justify-content: flex-end;
  text-align: right;
  flex: 1 1 min(100%, 160px);
  max-width: 100%;
}

@media (max-width: 767px) {
  .comparison-table-wrapper {
    display: none !important;
  }

  .comparison-cards {
    display: flex;
    flex-direction: column;
    gap: 18px;
  }
}

/* ===== Animations ===== */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.animate-on-scroll[data-animation="mask-left"] {
  transform: translateX(-30px);
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translate(0);
}

/* ===== Responsive ===== */
@media (max-width: 1200px) {
  .service-card {
    flex: 0 0 calc(50% - 13px);
  }
}

@media (max-width: 992px) {
  /* Lift entire header above page + Chaty (9999) while drawer is open — children cannot escape parent stacking context */
  .site-header.menu-open {
    z-index: 10050;
  }

  .nav-toggle {
    display: block;
    position: relative;
    z-index: 10060;
  }

  .main-nav {
    position: fixed;
    top: 0;
    bottom: 0;
    right: -300px;
    left: auto;
    width: 300px;
    max-width: min(300px, 100vw);
    height: auto;
    min-height: 100vh;
    min-height: 100dvh;
    background: var(--primary-dark);
    padding: max(24px, env(safe-area-inset-top, 0px)) 30px max(30px, env(safe-area-inset-bottom, 0px));
    display: flex;
    flex-direction: column;
    transition: right 0.3s;
    z-index: 10040;
    box-shadow: -8px 0 32px rgba(0, 0, 0, 0.25);
    box-sizing: border-box;
  }

  .main-nav.open {
    right: 0;
  }

  .main-nav ul {
    flex: 1;
    flex-direction: column;
    gap: 0;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .main-nav a {
    display: block;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255,255,255,0.08);
  }

  .dropdown {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    padding-left: 15px;
    display: none;
  }

  .dropdown a {
    color: rgba(255,255,255,0.78);
  }

  .has-dropdown.open .dropdown {
    display: block;
  }

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

  .skills-grid {
    grid-template-columns: 1fr;
    gap: 60px;
  }

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

  .process-image {
    min-height: 250px;
    background-attachment: scroll;
  }

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

  .cta-section {
    padding: 60px 0;
  }

  .cta-grid {
    flex-direction: column;
    text-align: center;
    gap: 28px;
  }

  .cta-text .section-label.light {
    letter-spacing: 0.18em;
  }

  .cta-text h2 {
    font-size: clamp(24px, 5.5vw, 36px);
    padding: 0 4px;
  }

  .cta-chat-hint {
    justify-content: flex-start;
    text-align: left;
    max-width: min(100%, 400px);
    margin-inline: auto;
    margin-top: 18px;
    font-size: 15px;
    line-height: 1.55;
    gap: 10px;
    padding: 14px 16px;
    background: rgba(0, 0, 0, 0.18);
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-sizing: border-box;
  }

  .cta-chat-hint .fa-whatsapp {
    font-size: 20px;
    margin-top: 2px;
  }

  .logos-grid {
    grid-template-columns: repeat(3, 1fr);
  }

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

  .counters-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .hero {
    min-height: 360px;
    height: clamp(360px, 50vh, 520px);
  }

  .hero-content {
    padding-top: var(--header-height);
  }

  .hero-title {
    font-size: clamp(36px, 12vw, 56px);
  }

  .hero-desc {
    font-size: 15px;
  }

  .hero-nav {
    display: none;
  }

  .service-card {
    flex: 0 0 100%;
  }

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

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

  .accordion-item {
    padding: 0 18px;
  }

  .cta-section {
    padding: 48px 0;
  }

  .cta-grid {
    gap: 22px;
  }

  .cta-text h2 {
    font-size: clamp(22px, 6.2vw, 30px);
    line-height: 1.25;
  }

  .cta-chat-hint {
    font-size: 14px;
    line-height: 1.5;
    padding: 14px 14px;
    max-width: 100%;
  }
}

@media (max-width: 480px) {
  .section-title {
    font-size: 30px;
  }

  .services-carousel,
  .about-section,
  .skills-section,
  .faq-section,
  .comparison-section {
    padding-top: 84px;
    padding-bottom: 84px;
  }

  .service-card,
  .capability-card,
  .mv-item,
  .counter-item {
    border-radius: 18px;
  }

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

  .logos-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .cta-section {
    padding: 40px 0;
  }

  .cta-chat-hint {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 12px;
    padding: 16px 14px;
    border-radius: 16px;
  }

  .cta-chat-hint .fa-whatsapp {
    margin-top: 0;
    font-size: 28px;
  }
}
