/* ==========================================================================
   Template Stylesheet
   Description: Universal Styling Sheet for Portfolio / Landing Templates
   Author: FrontSyl
   Version: 1.0.0
   License: Custom License (see LICENSE.md for details)
========================================================================== */

/* ==========================================================================
   Fonts & Globals
========================================================================== */

body {
  font-family: "Inter", sans-serif;
}

/* ==========================================================================
   SCROLLBAR STYLES
========================================================================== */

/* Light Mode */

:root {
  scrollbar-width: thin;
  scrollbar-color: rgba(30, 64, 175, 0.8) rgba(0, 0, 0, 0.05);
}

/* Dark Mode Scrollbar */

html.dark {
  scrollbar-width: thin;
  scrollbar-color: rgba(147, 197, 253, 0.8) #1e293b;
}

/* ========================================================================== 
   Navbar Base (existing CSS)
   ========================================================================== */
/* -------- NAV-LINK UNDERLINE (except “More” button) -------- */
.nav-link {
  position: relative;
  display: inline-block;
  padding-bottom: 0.25rem;
  transition: color 0.4s;
  color: #1e40af; /* blue-800 */
  font-weight: 500;
}
.nav-link:not(.dropdown-link)::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 4px;
  width: 0;
  border-radius: 9999px;
  background: #1e40af;
  transition: width 0.4s ease;
}
.nav-link:not(.dropdown-link):hover::after,
.nav-link:not(.dropdown-link).active::after {
  width: 100%;
}
.nav-link:hover,
.nav-link.active {
  color: #1e40af;
}
/* Dark mode for nav-link */
.dark .nav-link {
  color: #cbd5e1; /* gray-300 */
}

.dark .nav-link:not(.dropdown-link)::after {
  background: #bfdbfe; /* blue-200 for dark mode */
}

.dark .nav-link:not(.dropdown-link):hover::after,
.dark .nav-link:not(.dropdown-link).active::after {
  background: #bfdbfe; /* blue-200 */
}
.dark .nav-link:hover,
.dark .nav-link.active {
  color: #bfdbfe;
}

/* -------- “More” TEXT UNDERLINE ONLY -------- */
.dropdown-text {
  position: relative;
  display: inline-block;
}

.dropdown-text::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  transform: translateY(0.2rem);
  height: 3px;
  width: 0;
  border-radius: 9999px;
  background: #1e40af;
  transition: width 0.4s ease;
}

/* trigger expand underline */
.dropdown-link:hover .dropdown-text::after,
.dropdown-link.active .dropdown-text::after {
  width: 100%;
}

/* dark mode underline color */
.dark .dropdown-text::after {
  background: #bfdbfe;
}

/* -------- DROPDOWN SHOW/HIDE -------- */
.dropdown-container .dropdown-menu {
  opacity: 0;
  transform: translateY(-0.5rem);
  pointer-events: none;
  transition: opacity 0.2s ease-out, transform 0.2s ease-out;
}
.dropdown-container.open .dropdown-menu {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* ==========================================================================
   Hero Layout
========================================================================== */

/* ---------------------------------------
   Testimonial Card Light & Dark Styles
   --------------------------------------- */

/* Wrapper */
.testimonial-wrapper {
  position: relative;
  margin: auto;
  max-width: 28rem;
}

/* Soft Gradient Backdrop */
.card-backdrop {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(99, 179, 237, 0.15),
    rgba(141, 204, 242, 0.15)
  );
  border-radius: 2rem;
  filter: blur(50px);
  z-index: 0;
  transition: background 0.5s;
}

/* Main Card */
.testimonial-card {
  position: relative;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(12px);
  border-radius: 1.5rem;
  padding: 2.5rem 2.5rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  overflow: visible;
  z-index: 10;
  transition: background-color 0.6s ease-in-out, border-color 0.6s ease-in-out,
    box-shadow 0.6s ease-in-out, color 0.6s ease-in-out,
    transform 0.3s ease-in-out;
}

/* Dark mode override */
html.dark .testimonial-card {
  background: rgba(30, 41, 59, 0.8);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.testimonial-card.hover-enhance:hover {
  /* Fade the border-color to a soft, semi-transparent shade */
  border-color: rgba(59, 130, 246, 0.15) !important; /* light mode */
  /* In dark mode, you might want a slightly different semi-transparent */
  /* Example for dark mode: border-color: rgba(148, 163, 184, 0.15) */

  /* Slight upward lift */
  transform: translateY(-4px) !important;

  /* Deeper shadow to reinforce lifting effect */
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.12) !important;
}

/* Quote Icon */
.quote-icon {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  font-size: 1.75rem;
  color: #3b82f6;
  opacity: 0.25;
  z-index: 15;
}

/* Testimonial Text */
.testimonial-text {
  font-style: italic;
  color: #4b5563;
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 1.75rem;
}
html.dark .testimonial-text {
  color: #cbd5e1;
}

/* User Info */
.user-info {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.avatar {
  width: 48px;
  height: 48px;
  border-radius: 9999px;
  border: 2px solid #3b82f6;
}
html.dark .avatar {
  border-color: #93c5fd;
}
.user-name {
  font-weight: 600;
  font-size: 1rem;
  color: #1e3a8a;
}
html.dark .user-name {
  color: #f1f5f9;
}
.user-role {
  font-size: 0.875rem;
  color: #6b7280;
}
html.dark .user-role {
  color: #94a3b8;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .testimonial-wrapper {
    margin-top: 3rem;
  }
  .testimonial-card {
    padding: 2rem 1.5rem;
  }
  .testimonial-text {
    font-size: 0.9rem;
  }
  .user-name {
    font-size: 0.95rem;
  }
  .user-role {
    font-size: 0.8rem;
  }
  .quote-icon {
    font-size: 1.5rem;
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .testimonial-wrapper {
    margin-top: 4rem;
  }
  .testimonial-card {
    padding: 2.5rem 2rem;
  }
  .testimonial-text {
    font-size: 0.8rem;
  }
  .user-name {
    font-size: 1.05rem;
  }
  .user-role {
    font-size: 0.9rem;
  }
  .quote-icon {
    font-size: 1.75rem;
  }
}


/* ---------------------------------------
   Stack Testimonial Card
   --------------------------------------- */

/* 1) Stack Container (wraps both cards) */
.stack-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  /* Reduce extra height to precisely cover down to the narrow card */
  height: calc(100% + 50px);
  z-index: 5;
  pointer-events: none;
}

.stack-container:hover,
.testimonial-wrapper:hover .stack-container {
  pointer-events: auto;
}

/* 2) Base .stack-card rules */
.stack-card {
  position: absolute;
  top: 0;
  left: 50%; /* Always center horizontally */
  height: 100%;
  border-radius: 1.5rem;
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
  cursor: pointer;

  /* Hidden state: collapsed vertically (scaleY(0)). 
     We use CSS variables for vertical offset and horizontal scale. */
  transform-origin: top center;
  transform: translateX(-50%) /* center under parent */
    translateY(var(--offset-y)) /* vertical offset from main card’s top */
    scaleX(var(--scale-x)) /* fixed “narrowing” factor */ scaleY(0); /* fully collapsed when hidden */
  opacity: 0;
  transition: transform 0.5s ease, opacity 0.5s ease;
}

/* Dark-mode override for .stack-card */
html.dark .stack-card {
  background: rgba(30, 41, 59, 0.6);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* 3) “Wide” Stack Card (just below main card) */
.stack-card--wide {
  width: 95%;
  z-index: 7;

  /* 
    6px below the bottom edge of the main testimonial card.
    scaleX(0.96) remains the same for perspective.
  */
  --offset-y: 6px;
  --scale-x: 0.96;
}

/* 4) “Narrow” Stack Card (beneath the wide card) */
.stack-card--narrow {
  width: 90%;
  z-index: 5;

  /* 
    18px below the top of the main card → 
    that is effectively 12px below the wide card (6px + 12px).
    scaleX(0.92) to shrink it further.
  */
  --offset-y: 18px;
  --scale-x: 0.92;
}

.stack-container .stack-card:nth-child(1) {
  --offset-y: 0.4rem;
  --scale-x: 1;
  z-index: 3;
}
.stack-container .stack-card:nth-child(2) {
  --offset-y: 1.2rem;
  --scale-x: 0.96;
  z-index: 2;
}
.stack-container .stack-card:nth-child(3) {
  --offset-y: 2rem;
  --scale-x: 0.92;
  z-index: 1;
}

/* 5) Hover: Expand both cards (scaleY→1, opacity→1) */
.testimonial-wrapper:hover .stack-card,
.stack-container:hover .stack-card {
  transform: translateX(-50%) translateY(var(--offset-y)) scaleX(var(--scale-x))
    scaleY(1); /* fully expand vertically */
  opacity: 1;
}

/* 6) Style for “SEE MORE” text in wide card */
.see-more-text {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  color: #6b7280;
  font-size: 0.875rem;
  font-weight: 600;
  pointer-events: none; /* allow clicks to pass through to the link underneath */
  white-space: nowrap;
}

html.dark .see-more-text {
  color: #94a3b8;
}

/* 7) Hide Stack Card on Mobile Screen */
@media (max-width: 768px) {
  .stack-container {
    display: none;
  }
}

/* ============================
   Popular Badge - Refined
   ============================ */

/* 1) Parent card: make sure overflow is visible so the badge doesn't get cut off */
.ribbon-card {
  position: relative;
  overflow: visible;
}

/* 2) Capsule style badge in the top right corner */
.ribbon-card .badge-box {
  background-color: rgba(59, 130, 246, 0.1); /* Soft blue */
  color: #3b82f6; /* Blue text color */
  padding: 0.25rem 0.75rem;
  border-radius: 9999px; /* Capsule shape */
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 10;
  border: 1px solid rgba(59, 130, 246, 0.2);
  backdrop-filter: blur(4px);
  transition: all 0.7s;
}

/* 3) Dark mode: badges are brighter and remain soft */
.dark .ribbon-card .badge-box {
  background-color: rgba(147, 197, 253, 0.2);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

/* ==========================================================================
   Header Glass on Scroll
========================================================================== */

#site-header {
  background: transparent;
}
#site-header.scrolled {
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(30px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.dark #site-header.scrolled {
  background: rgba(30, 41, 59, 0.6);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

/* ==========================================================================
   Experience Section
========================================================================== */

.experience-section .timeline-line::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  height: 100%;
  width: 2px;
  background: linear-gradient(to bottom, #3b82f6, transparent);
  animation: pulseLine 3s infinite linear;
}

@keyframes pulseLine {
  0% {
    opacity: 0.1;
  }
  50% {
    opacity: 0.5;
  }
  100% {
    opacity: 0.1;
  }
}

/* ==========================================================================
   FAQ SECTION
========================================================================== */

.faq-question {
  padding-top: 20px;
  padding-bottom: 20px;
}

/* Make sure this rule is after Tailwind CSS */
.faq-answer {
  max-height: 0; /* Start from closed */
  overflow: hidden;
  padding-bottom: 0; /* Bottom padding when closed = 0 */
  transition: max-height 0.45s ease, padding-bottom 0.45s ease;
}
.faq-answer.open {
  /* Set max-height according to the longest content in your FAQ.
  If the longest content is around 300−400px, set it to 600px for example. */
  max-height: 600px; /* Large enough for maximum content */
  padding-bottom: 1rem; /* Bottom space when open */
}

/* ==========================================================================
   Footer
========================================================================== */

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

/* ==========================================================================
   Dark Mode Card in Trusted Section
========================================================================== */

.dark .card-trusted img {
  filter: brightness(0) invert(1);
}

/* ==========================================================================
   Marquee Section
========================================================================== */

.logos__marquee,
.logos__marquee2 {
  display: flex;
  overflow-x: hidden;
  mask-image: linear-gradient(
    to right,
    hsl(0 0% 0% / 0),
    hsl(0 0% 0% / 1) 20%,
    hsl(0 0% 0% / 1) 80%,
    hsl(0 0% 0% / 0)
  );
}

.marquee__logos {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 1rem;
  min-width: 100%;
  animation: loop 20s linear infinite;
}

.marquee__logos2 {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 1rem;
  min-width: 100%;
  animation: loop 20s linear infinite;
  animation-direction: reverse;
}

.marquee__logos img,
.marquee__logos2 img {
  display: block;
  margin-inline: 2rem;
}

.dark .marquee__logos img,
.dark .marquee__logos2 img {
  filter: brightness(0) invert(1);
}

@keyframes loop {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-100%);
  }
}

/* ==========================================================================
   Scroll To Top Button
========================================================================== */

#scrollTopBtn {
  opacity: 0;
  transform: translateY(60px) scale(0.5);
  transition: opacity 0.4s ease-out,
    transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

#scrollTopBtn.show {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* ==========================================================================
   Preloader Animation
========================================================================== */

#preloader-wrapper {
  position: fixed;
  inset: 0;
  background: white;
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  opacity: 1;
  transition: opacity 0.5s ease;
  pointer-events: all;
}

/* ==========================================================================
   Preloader - 3D Animated Boxes
========================================================================== */

/* Container for 3D animated boxes */
#preloader {
  --size: 32px;
  --duration: 800ms;
  height: calc(var(--size) * 2);
  width: calc(var(--size) * 3);
  position: relative;
  transform: rotateX(60deg) rotateZ(45deg);
  transform-style: preserve-3d;
  margin-bottom: 40px;
}

/* Individual Box Setup */
#preloader .box {
  width: var(--size);
  height: var(--size);
  position: absolute;
  top: 0;
  left: 0;
  transform-style: preserve-3d;
}

/* Positioning and Animations for each box */
#preloader .box:nth-child(1) {
  transform: translate(100%, 0);
  animation: box1 var(--duration) linear infinite;
}
#preloader .box:nth-child(2) {
  transform: translate(0, 100%);
  animation: box2 var(--duration) linear infinite;
}
#preloader .box:nth-child(3) {
  transform: translate(100%, 100%);
  animation: box3 var(--duration) linear infinite;
}
#preloader .box:nth-child(4) {
  transform: translate(200%, 0);
  animation: box4 var(--duration) linear infinite;
}

/* Cube Sides */
#preloader .box > div {
  --background: #5c8df6;
  --top: auto;
  --right: auto;
  --bottom: auto;
  --left: auto;
  --translateZ: calc(var(--size) / 2);
  --rotateY: 0deg;
  --rotateX: 0deg;

  position: absolute;
  width: 100%;
  height: 100%;
  background: var(--background);
  top: var(--top);
  right: var(--right);
  bottom: var(--bottom);
  left: var(--left);
  transform: rotateY(var(--rotateY)) rotateX(var(--rotateX))
    translateZ(var(--translateZ));
}

/* Each face of the cube */
#preloader .box > div:nth-child(1) {
  --top: 0;
  --left: 0;
}
#preloader .box > div:nth-child(2) {
  --background: #145af2;
  --right: 0;
  --rotateY: 90deg;
}
#preloader .box > div:nth-child(3) {
  --background: #447cf5;
  --rotateX: -90deg;
}
#preloader .box > div:nth-child(4) {
  --background: #dbe3f4;
  --top: 0;
  --left: 0;
  --translateZ: calc(var(--size) * 3 * -1); /* back face */
}

/* ==========================================================================
   Preloader - Dark Mode Styles
========================================================================== */

html.dark #preloader-wrapper {
  background: #1e293b; /* Slate-900 */
}

html.dark #preloader .box > div {
  --background: #60a5fa; /* Blue-400 */
}

html.dark #preloader .box > div:nth-child(2) {
  --background: #3b82f6; /* Blue-500 */
}
html.dark #preloader .box > div:nth-child(3) {
  --background: #2563eb; /* Blue-600 */
}
html.dark #preloader .box > div:nth-child(4) {
  --background: rgba(15, 23, 42, 0.5); /* Semi-transparent Slate-900 */
}

/* ==========================================================================
   Preloader Box Animations
========================================================================== */

@keyframes box1 {
  0%,
  50% {
    transform: translate(100%, 0);
  }
  100% {
    transform: translate(200%, 0);
  }
}

@keyframes box2 {
  0% {
    transform: translate(0, 100%);
  }
  50% {
    transform: translate(0, 0);
  }
  100% {
    transform: translate(100%, 0);
  }
}

@keyframes box3 {
  0%,
  50% {
    transform: translate(100%, 100%);
  }
  100% {
    transform: translate(0, 100%);
  }
}

@keyframes box4 {
  0% {
    transform: translate(200%, 0);
  }
  50% {
    transform: translate(200%, 100%);
  }
  100% {
    transform: translate(100%, 100%);
  }
}

/* ==========================================================================
   AOS (Animate on Scroll) Extensions
========================================================================== */

/* Hide elements before AOS animation runs */
.aos-init-hidden [data-aos] {
  opacity: 0;
  pointer-events: none;
}

/* Custom fade-up with semi-dimmed effect */
[data-aos="fade-up-semidim"] {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

[data-aos="fade-up-semidim"].aos-animate {
  opacity: 0.5 !important; /* override Tailwind defaults */
  transform: translateY(0);
}

/* ==========================================================================
   Swiper (CARD/IMAGE Slider)
========================================================================== */

.testimonialSwiper {
  overflow: hidden; // <-- Ensure content stays within container

  /* Gradient mask for subtle slide edge fading effect */
  -webkit-mask-image: linear-gradient(
    to right,
    transparent 0%,
    black 10%,
    black 90%,
    transparent 100%
  );
  mask-image: linear-gradient(
    to right,
    transparent 0%,
    black 10%,
    black 90%,
    transparent 100%
  );
}

/* Hide default Swiper arrow icons */
.swiper-button-prev::after,
.swiper-button-next::after {
  display: none; // <-- Custom arrows only (if used)
}

.swiper-button-prev,
.swiper-button-next {
  width: 2.5rem;
  height: 2.5rem;
  border-color: #e5eaf2 !important;
}

/* === Pagination Bullets === */
.swiper-pagination-bullet {
  width: 11px !important;
  height: 11px !important;
  margin: 0 6px; // <-- Controls space between bullets
  background-color: rgba(54, 91, 143, 0.89); // <-- Semi-transparent gray-blue
}

.swiper-pagination-bullet-active {
  width: 11px !important;
  height: 11px !important;
  background-color: #2563eb; // <-- Active bullet color (blue-600)
}

/* === Dark Mode Overrides === */
.dark .swiper-pagination-bullet {
  background-color: #475569; // <-- Neutral bullet color in dark mode
}

.dark .swiper-pagination-bullet-active {
  background-color: #60a5fa; // <-- Active bullet in dark mode (blue-400)
}
