/* Custom tweaks for the homepage header */
.header__area-3.header__area-3--light {
  background-color: var(--white);
  border-bottom: 1px solid var(--white-2);
}

/* Dark mode header override for light-style header */
.dark .header__area-3.header__area-3--light {
  background-color: var(--black-2);
  border-bottom: 1px solid var(--black-6);
}

/* Offset fixed header so hero text isn't clipped */
.hero__area {
  padding-top: 110px;
}

/* Constrain oversized logo assets in the header */
.header__logo-2 img {
  width: 180px;
  height: auto;
}

/* Constrain oversized logo assets in the footer */
.footer__logo {
  width: 200px;
  height: auto;
  max-width: 100%;
}

.footer__logo-3 img {
  width: 200px;
  height: auto;
}

/* Constrain oversized logo assets in the offcanvas menu */
.offcanvas__logo img {
  width: 180px;
  height: auto;
}

/* Theme toggle button in header */
.header__nav-icon-3 {
  display: flex;
  align-items: center;
  gap: 12px;
}

.theme-toggle {
  border: 1px solid var(--black-2);
  background: transparent;
  color: var(--black-2);
  width: 36px;
  height: 36px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.theme-toggle:hover {
  background: var(--black-2);
  color: var(--white);
}

.dark .theme-toggle {
  border-color: var(--white-2);
  color: var(--white);
}

.dark .theme-toggle:hover {
  background: var(--white);
  color: var(--black-2);
}

.logo-gradient {
  color: #7023ff;
  display: inline-block;
  position: relative;
  z-index: 2;
  isolation: isolate;
  mix-blend-mode: normal;
}

.logo-gradient .char {
  color: inherit;
}

@supports (-webkit-background-clip: text) or (background-clip: text) {
  .logo-gradient {
    background: linear-gradient(90deg, #ffffff 0%, #ffffff 100%);
    background-repeat: no-repeat;
    background-size: 100% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
  }

  .logo-gradient .char {
    background: linear-gradient(90deg, #ffffff 0%, #ffffff 100%);
    background-repeat: no-repeat;
    background-size: 100vw 100%;
    background-position: left center;
    background-attachment: fixed;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
  }
}






/* Header menu hover underline */
.header__area-3 .main-menu-3 > li > a {
  position: relative;
}

.header__area-3 .main-menu-3 > li > a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 14px;
  height: 2px;
  width: 0;
  margin: 0 auto;
  background: linear-gradient(90deg, var(--lime), var(--lime-2));
  border-radius: 999px;
  transition: width 0.25s ease;
}

.header__area-3 .main-menu-3 > li > a:hover::after,
.header__area-3 .main-menu-3 > li > a:focus-visible::after {
  width: 100%;
}

/* Header menu hover text color */
.header__area-3 .main-menu-3 > li > a:hover .menu-text,
.header__area-3 .main-menu-3 > li > a:focus-visible .menu-text {
  color: var(--lime);
  text-shadow: none;
}

.header__area-3 .main-menu-3 > li > a:hover .menu-text span,
.header__area-3 .main-menu-3 > li > a:focus-visible .menu-text span {
  background: linear-gradient(90deg, var(--lime), var(--lime-2));
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

/* Footer layout fix */
.footer__area .footer__btm {
  background-color: var(--black-2);
}

.footer__area .footer__row {
  margin-left: 0 !important;
  margin-right: 0 !important;
}

.footer__area .footer__inner {
  background-color: transparent;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

.footer__area .footer__top {
  text-align: center;
}

.footer__area .footer__top img {
  display: block;
  width: 100%;
  max-width: 520px;
  height: auto;
  margin: 0 auto;
}

/* Footer overlap fix */
.footer__area .footer__top img {
  margin-bottom: 0 !important;
  transform: none !important;
}

.footer__area .footer__btm {
  position: relative;
  z-index: 1;
}

/* ============================
   Responsive hero fixes ✅
   - Prevent header/hero overlap
   - Scale headline for small viewports
   - Stack subtitle below headline on small screens
   - Hide decorative pseudo-box on tiny screens
   ============================ */

/* Make extra space under the fixed header on smaller screens */
@media (max-width: 991px) {
  .hero__area {
    padding-top: 140px; /* increase offset so header won't overlap */
  }
  .hero__content {
    padding-top: 160px;
  }
}

/* Mobile-specific adjustments */
@media (max-width: 767px) {
  .hero__area {
    padding-top: 170px;
    padding-bottom: clamp(180px, 40vw, 320px);
  }
  /* scale the hero title fluidly and increase line-height slightly */
  .hero__title {
    font-size: clamp(28px, 8vw, 40px);
    line-height: 1.05;
    margin-top: 20px;
    word-break: break-word;
    white-space: normal;
  }

  /* ensure the title wrapper uses the full width and has safe padding */
  .hero__title-wrapper {
    max-width: 100%;
    margin-bottom: 10px;
    padding-right: 20px;
  }

  /* place subtitle below the title and remove absolute positioning */
  .hero__sub-title {
    position: static !important;
    margin-top: 12px;
    padding-top: 0;
    right: auto;
    bottom: auto;
  }

  /* hide the decorative 'Pro' box on very small screens to avoid overlap */
  .hero__title::after {
    display: none;
  }

  /* make hero images less intrusive on mobile */
  .hero__area .hero1_bg {
    opacity: 0.6;
    bottom: -20px;
  }
}

/* Mid-size screens — keep headline readable */
@media (min-width:768px) and (max-width:1199px) {
  .hero__title {
    font-size: clamp(48px, 6vw, 86px);
    line-height: 1;
  }
  .hero__title-wrapper {
    max-width: 800px;
  }
}

/* Prevent hero/background overlap on small + medium screens */
@media (min-width: 768px) and (max-width: 991px) {
  .hero__area {
    padding-bottom: clamp(140px, 25vw, 280px);
  }

  .hero__title-wrapper {
    margin-bottom: 24px;
  }

  .hero__sub-title {
    position: static !important;
    max-width: 100%;
    margin-top: 16px;
  }

  .hero__title::after {
    display: none;
  }

  .hero__area .hero1_bg {
    max-height: 60vh;
    object-fit: cover;
    opacity: 0.7;
  }
}

/* About page: flowing brand marquee */
.brand__area .brand__marquee {
  overflow: hidden;
  border-top: 1px solid var(--white-3);
  border-bottom: 1px solid var(--white-3);
}

.brand__area .brand__track {
  display: flex;
  width: max-content;
  animation: brandFlow 8s linear infinite;
}

.brand__area .brand__list--flow {
  display: flex;
  align-items: center;
  gap: 56px;
  background: transparent;
  border: none;
  margin: 0;
  padding: 28px 12px;
  flex-wrap: nowrap;
}

.brand__area .brand__list--flow .brand__item {
  flex: 0 0 auto;
  padding: 0;
  border: none;
}

.brand__area .brand__list--flow img {
  display: block;
  max-height: 64px;
  width: auto;
  opacity: 0.9;
  filter: grayscale(0.05);
  transition: opacity 0.2s ease;
}

.brand__area .brand__marquee:hover .brand__track {
  animation-play-state: paused;
}

@keyframes brandFlow {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

@media (max-width: 991px) {
  .brand__area .brand__list--flow {
    gap: 36px;
  }

  .brand__area .brand__list--flow img {
    max-height: 54px;
  }
}

@media (max-width: 575px) {
  .brand__area .brand__list--flow {
    gap: 26px;
    padding: 22px 8px;
  }

  .brand__area .brand__list--flow img {
    max-height: 46px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .brand__area .brand__track {
    animation: none;
  }

  .brand__area .brand__list--flow {
    flex-wrap: wrap;
    justify-content: center;
  }

  .brand__area .brand__list--flow + .brand__list--flow {
    display: none;
  }
}

/* Service 4 modern layout + animation cleanup */
.service-4-page .service-4-hero {
  position: relative;
  background:
    radial-gradient(900px circle at 15% -10%, rgba(201, 243, 29, 0.12), transparent 55%),
    radial-gradient(800px circle at 95% 0%, rgba(255, 255, 255, 0.06), transparent 45%);
}

.service-4-page .service-4-hero .row {
  align-items: flex-start;
  row-gap: 20px;
}

.service-4-page .service-4-hero .sec-title {
  margin-bottom: 8px;
}

.service-4-page .service-4-hero .sec-text {
  padding-left: 0;
  border-left: 0;
  max-width: 900px;
  margin-top: 28px;
}

.service-4-page .service-4-hero .sec-title {
  margin-bottom: 28px;
}

.service-4-page .portfolio__service .sec-title {
  max-width: 560px;
  font-size: clamp(52px, 5.9vw, 98px);
  line-height: 1.04;
  letter-spacing: 0.4px;
  text-transform: none;
  word-break: normal;
  overflow-wrap: normal;
  text-wrap: balance;
}

.service-4-page .service-4-title-line {
  display: block;
  white-space: nowrap;
}

@media (max-width: 767px) {
  .service-4-page .service-4-title-line {
    white-space: normal;
  }
}

.service-4-page .portfolio__service .sec-text {
  background-image: none;
  padding-left: 24px;
  border-left: 1px solid rgba(0, 0, 0, 0.08);
}

.service-4-page .portfolio__service .sec-text,
.service-4-page .portfolio__service-item {
  filter: none;
}

.service-4-page .portfolio__service .sec-text p {
  padding-top: 0;
  max-width: 640px;
  font-size: 18px;
  line-height: 1.75;
}

.service-4-page .portfolio__service .sec-text strong {
  color: inherit;
  font-weight: 600;
}

.service-4-page .portfolio__service .sec-text p:first-child {
  font-size: 20px;
  line-height: 1.6;
  margin-top: 22px;
}

.service-4-page .portfolio__service .sec-text strong {
  display: inline-block;
  margin-top: 28px;
  margin-bottom: 10px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--white);
}

.service-4-page .portfolio__service-list .row > [class*="col-"] {
  display: flex;
}

.service-4-page .portfolio__service-list .row {
  row-gap: 24px;
}

.service-4-page .portfolio__service-item {
  height: 100%;
  background: rgba(0, 0, 0, 0.02);
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.15);
  backdrop-filter: blur(6px);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.service-4-page .portfolio__service-item::after {
  background: rgba(0, 0, 0, 0.08);
}

.service-4-page .portfolio__service-item:hover {
  transform: translateY(-6px);
  border-color: rgba(201, 243, 29, 0.45);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25);
}

.service-4-page .portfolio__service-item .ps-title {
  letter-spacing: 0.2px;
}

.service-4-page .service-4-hero .animation__char_come,
.service-4-page .service-4-hero .title-anim {
  opacity: 1 !important;
  transform: none !important;
}

.service-4-page .service-4-hero .animation__char_come .char,
.service-4-page .service-4-hero .title-anim .char {
  transform: none !important;
}

.dark .service-4-page .portfolio__service .sec-text strong {
  color: var(--white);
}

.dark .service-4-page .portfolio__service .sec-text {
  border-left-color: rgba(255, 255, 255, 0.12);
}

.dark .service-4-page .portfolio__service-item {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.25);
}

.dark .service-4-page .portfolio__service-item::after {
  background: rgba(255, 255, 255, 0.08);
}

.dark .service-4-page .portfolio__service-item:hover {
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

/* Light theme refinements */
body:not(.dark).service-4-page .service-4-hero {
  background:
    radial-gradient(900px circle at 10% -15%, rgba(201, 243, 29, 0.2), transparent 55%),
    radial-gradient(700px circle at 90% 0%, rgba(0, 0, 0, 0.03), transparent 50%),
    linear-gradient(180deg, #f8f9fb 0%, #ffffff 60%);
}

body:not(.dark).service-4-page .portfolio__service .sec-text {
  border-left-color: rgba(0, 0, 0, 0.12);
}

body:not(.dark).service-4-page .portfolio__service-item {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.08);
}

body:not(.dark).service-4-page .portfolio__service-item::after {
  background: rgba(0, 0, 0, 0.1);
}

body:not(.dark).service-4-page .portfolio__service-item:hover {
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.12);
}

body:not(.dark).service-4-page .portfolio__service .sec-text strong {
  color: var(--black-2);
}

@media (max-width: 991px) {
  .service-4-page .portfolio__service .sec-text {
    padding-left: 0;
    border-left: 0;
  }
}
