/* ===============================
   DESIGN TOKENS
   =============================== */

html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

:root {
  --primary: #4232c2;
  --primary-light: #6f61ff;
  --dark: #1f2933;
  --muted: #6b7280;
  --bg-light: #f8fafc;
  --radius: 14px;
  --shadow-sm: 0 6px 18px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 14px 40px rgba(0, 0, 0, 0.18);
}

/* ===============================
   CLEAN BASE LAYOUT SYSTEM
   =============================== */

.container {
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 24px;
}

.full-width {
  width: 100%;
}

.flex {
  display: flex;
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.grid {
  display: grid;
}

.text-left {
  text-align: left;
}
.text-center {
  text-align: center;
}
.text-right {
  text-align: right;
}

/* ===============================
   GLOBAL
   =============================== */

* {
  box-sizing: border-box;
}

body {
  font-family: "Open Sans", sans-serif;
  background: var(--bg-light);
  color: var(--dark);
}

p {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--muted);
}

/* ===============================
   MODERN CUSTOM NAVBAR
   =============================== */

.nav-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.nav-container {
  max-width: 1200px;
  margin: auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Logo */
.nav-logo img {
  height: 44px;
  transition: transform 0.3s ease;
}

.nav-logo:hover img {
  transform: scale(1.06);
}

/* Nav menu */
.nav-menu {
  display: flex;
  align-items: center;
  gap: 14px;
}

.nav-link {
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  color: #1f2933;
  padding: 8px 18px;
  border-radius: 999px;
  transition: all 0.3s ease;
}

.nav-link:hover {
  background: linear-gradient(135deg, #4232c2, #6f61ff);
  color: #ffffff;
  box-shadow: 0 6px 18px rgba(66, 50, 194, 0.35);
}

/* CTA */
.nav-cta {
  background: linear-gradient(135deg, #4232c2, #6f61ff);
  color: #fff;
}

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
}

.nav-toggle span {
  width: 26px;
  height: 2.5px;
  background: #1f2933;
  border-radius: 2px;
}

/* ===============================
   MOBILE NAVBAR
   =============================== */

@media (max-width: 900px) {
  .nav-toggle {
    display: flex;
  }

  .nav-menu {
    position: absolute;
    top: 100%;
    right: 20px;
    width: calc(100% - 40px);
    background: #ffffff;
    flex-direction: column;
    padding: 20px;
    border-radius: 18px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
    transform: translateY(-10px);
    opacity: 0;
    pointer-events: none;
    transition: all 0.35s ease;
  }

  .nav-menu.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav-link {
    width: 100%;
    text-align: center;
    font-size: 1rem;
    padding: 12px;
  }
}

/* ======================================================
   HERO – AUTOMOTIVE BACKGROUND SLIDESHOW
   ====================================================== */

.hero {
  position: relative;
  min-height: 91vh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ===============================
   BACKGROUND SLIDES
   =============================== */

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;

  opacity: 0;
  transform: scale(1.08);
  transition: opacity 1.2s ease, transform 6s linear;
}

/* Blur + dark overlay */
.hero-bg-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(15, 15, 35, 0.65);
  backdrop-filter: blur(6px);
}

.hero-bg-slide.active {
  opacity: 1;
  transform: scale(1);
}

/* ===============================
   FOREGROUND SLIDES
   =============================== */

.hero-slider {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1200px;
  padding: 0 20px;
  overflow: hidden; /* ADD THIS */
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;

  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.hero-slide.active {
  opacity: 1;
  transform: translateY(0);
  position: relative;
}

.hero-content {
  max-width: 820px;
  color: #fff;
}

.hero-content h1 {
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 600;
}

.hero-content strong {
  color: #6b63f2;
}

.hero-content p {
  margin-top: 12px;
  color: rgba(255, 255, 255, 0.85);
}

/* ===============================
   PAGINATION
   =============================== */

.hero-pagination {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  gap: 14px;
}

.hero-dot {
  width: 26px;
  height: 6px;
  border-radius: 999px;
  border: none;
  background: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.hero-dot.active {
  width: 46px;
  background: #6152ec;
  box-shadow: 0 0 0 3px rgba(86, 77, 176, 0.35);
  /* #564db0 border tone */
}

/* ===============================
   DESKTOP ARROWS
   =============================== */

.hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;

  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  cursor: pointer;

  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 22px;

  transition: background 0.3s ease;
}

.hero-arrow:hover {
  background: rgba(97, 82, 236, 0.85);
}

.hero-arrow.prev {
  left: 30px;
}
.hero-arrow.next {
  right: 30px;
}

/* Hide arrows on mobile */
@media (max-width: 768px) {
  .hero-arrow {
    display: none;
  }
  .hero {
    min-height: 85vh;
  }
}

/* ======================================================
   SERVICES SECTION 
   ====================================================== */

.services {
  padding: 4rem 1rem 3rem;
  background: linear-gradient(180deg, #ffffff 0%, #f7f8ff 100%);
}

/* ===============================
   HEADER
   =============================== */

.services-header {
  text-align: center;
  margin-bottom: 2.5rem;
  position: relative;
}

.services-header h2 {
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  font-weight: 600;
  color: #1f2933;
  margin-bottom: 10px;
}

/* Accent line */
.services-accent {
  display: block;
  width: 64px;
  height: 4px;
  margin: auto;
  border-radius: 999px;
  background: linear-gradient(90deg, #6152ec, #6b63f2);
  box-shadow: 0 4px 14px rgba(86, 77, 176, 0.45);
}

/* ===============================
   FILTER BAR
   =============================== */

.services-filter {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  overscroll-behavior-x: contain;
}

/* Buttons */
.services-filter .filter-btn {
  appearance: none;
  border: 1px solid rgba(97, 82, 236, 0.35);
  background: rgba(255, 255, 255, 0.75);
  color: #1f2933;

  padding: 10px 22px;
  font-size: 0.95rem;
  font-weight: 500;
  border-radius: 999px;
  cursor: pointer;

  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.35s cubic-bezier(0.22, 1, 0.36, 1), background-color 0.35s ease,
    color 0.35s ease;
}

/* Hover */
.services-filter .filter-btn:hover {
  transform: translateY(-2px);
  background: rgba(97, 82, 236, 0.08);
  box-shadow: 0 8px 22px rgba(86, 77, 176, 0.25);
}

/* Active */
.services-filter .filter-btn.active {
  background: linear-gradient(135deg, #6152ec, #6b63f2);
  color: #ffffff;
  border-color: transparent;

  box-shadow: 0 10px 26px rgba(86, 77, 176, 0.45),
    inset 0 0 0 1px rgba(255, 255, 255, 0.25);
}

/* ===============================
   MOBILE EXPERIENCE
   =============================== */

@media (max-width: 768px) {
  .services-filter {
    justify-content: flex-start;
    overflow-x: auto;

    padding: 8px 12px; /* more breathing space */
    gap: 14px; /* slightly wider gap */
    align-items: center;
    height: 100%;
  }

  .services-filter::-webkit-scrollbar {
    display: none;
  }

  .services-filter .filter-btn {
    white-space: nowrap;

    font-size: 1rem; /* slightly bigger text */
    padding: 14px 22px; /* bigger tap area */
    line-height: 1.2;

    border-radius: 999px;
  }
}

/* ===============================
   PORTFOLIO GRID
   =============================== */

.portfolio-section {
  padding: 4rem 1.5rem;
  background: #ffffff;
}

.portfolio-grid {
  max-width: 1300px;
  margin: auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

@media (max-width: 1200px) {
  .portfolio-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 900px) {
  .portfolio-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 520px) {
  .portfolio-grid {
    grid-template-columns: 1fr;
  }
}

/* ===============================
   CARD WITH IMAGE
   =============================== */

.portfolio-card {
  position: relative;
  height: 260px;
  border-radius: 18px;
  overflow: hidden;
  cursor: pointer;
  background: #000;

  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.portfolio-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.4);
}

/* Image */
.portfolio-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.05);
  transition: transform 0.8s ease;
}

.portfolio-card:hover img {
  transform: scale(1.15);
}

/* Dark overlay */
.portfolio-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.7));
}

/* Title pill */
.portfolio-card-title {
  position: absolute;
  bottom: 16px;
  left: 16px;
  z-index: 2;

  padding: 8px 18px;
  border-radius: 999px;

  font-size: 0.9rem;
  font-weight: 500;
  color: #ffffff;

  background: linear-gradient(135deg, #6152ec, #6b63f2);
  border: 1px solid #564db0;

  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
}

/* ===============================
   MODAL (SCROLL FIXED)
   =============================== */

.portfolio-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  width: 100%;
  max-width: 100%;
  display: none;
  overflow-y: auto;
  overflow-x: hidden;
}

.portfolio-modal.active {
  display: block;
}

body.modal-open {
  position: fixed;
  inset: 0;
  overflow: hidden;
}

.portfolio-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
}

.portfolio-modal-content {
  position: relative;
  max-width: 720px;
  max-height: 80vh;
  margin: 6vh auto;
  padding: 28px;

  background: #ffffff;
  border-radius: 18px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.45);

  display: flex;
  flex-direction: column;
  width: calc(100% - 32px); /* ADD */
  box-sizing: border-box; /* ADD */
}

.portfolio-modal-content h3 {
  margin-bottom: 14px;
}

.portfolio-modal-body {
  overflow-y: auto;
  line-height: 1.7;
  color: #4b5563;
}

.portfolio-modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  font-size: 26px;
  background: none;
  border: none;
  cursor: pointer;
}

/* ===============================
   CTA SECTION (CLEAN)
   =============================== */

.cta-section {
  width: 100%;
  background: linear-gradient(135deg, #6152ec, #6b63f2);
  padding: 64px 0;
}

.cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.cta-text h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 6px;
}

.cta-text p {
  color: rgba(255, 255, 255, 0.85);
  font-size: 1rem;
}

.cta-btn {
  padding: 14px 32px;
  border-radius: 999px;
  background: #ffffff;
  color: #6152ec;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.25);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}

@media (max-width: 768px) {
  .cta-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .cta-btn {
    margin-top: 16px;
  }
}

/* ===============================
   RECENT WORK
   =============================== */

.recent-work.card {
  border-radius: var(--radius);
  transition: transform 0.3s ease;
}

.recent-work.card:hover {
  transform: translateY(-6px);
}

/* ===============================
   FOOTER
   =============================== */

footer p {
  font-size: 0.9rem;
}

.footer-icons i {
  transition: transform 0.2s ease;
}

.footer-icons i:hover {
  transform: scale(1.15);
}

/* ===============================
   BACK TO TOP
   =============================== */

#backToTop {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: 999px;
  display: none;
  z-index: 999;
  box-shadow: var(--shadow-lg);
}

/* ===============================
   MOBILE REFINEMENTS
   =============================== */

@media (max-width: 768px) {
  section {
    padding: 2.5rem 1rem;
  }

  .hero-title {
    line-height: 1.3;
  }

  footer .col-lg-3 {
    margin-bottom: 1.5rem;
  }
}
