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

/* ======================
  BASE TYPOGRAPHY & SCROLL
====================== */
body {
  font-family: "Inter", sans-serif; /* Modern sans-serif font for clean readability */
}

html {
  scroll-behavior: smooth; /* Enables smooth scrolling for anchor links */
}

/* ======================
  SHADOW CUSTOM
====================== */
.shadow-primary {
  --tw-drop-shadow: drop-shadow(
    0 0 20px color-mix(in srgb, var(--color-secondary) 30%, transparent)
  );
  filter: var(--tw-drop-shadow);
}

.dark .shadow-primary {
  --tw-drop-shadow: drop-shadow(
    0 0 20px color-mix(in srgb, var(--color-secondary-dark) 30%, transparent)
  );
}

/* ======================
  SWIPER CUSTOMIZATION
====================== */

/* Remove default Swiper navigation icons for cleaner custom controls */
.swiper-button-prev::after,
.swiper-button-next::after {
  display: none !important;
}

/* Ensure Swiper testimonial container is positioned relative for absolute controls */
.swiper.testimonialSwiper {
  position: relative;
}
/* ======================
  CUSTOM NAVIGATION BUTTONS
====================== */
.swiper-button-prev,
.swiper-button-next {
  top: 0 !important;
  bottom: 0 !important;
  margin: auto 0 !important;
  position: absolute;
  width: 2.5rem;
  height: 2.5rem;
  background: var(--color-trinary);
  border: 1px solid var(--color-secondary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-secondary);
  z-index: 20;
  transition: background 0.2s, color 0.2s;
}

/* ======== DARK MODE SUPPORT ======== */
.dark .swiper-button-prev,
.dark .swiper-button-next {
  background: var(--color-primary-light-dark);
  border-color: var(--color-secondary-dark);
  color: var(--color-secondary-dark);
}

/* Default horizontal positions for navigation buttons */
.swiper-button-prev {
  left: -2.75rem;
}
.swiper-button-next {
  right: -2.75rem;
}

/* ======================
  RESPONSIVE BREAKPOINTS
====================== */
@media (max-width: 1024px) {
  .swiper-button-prev {
    left: -2rem;
  }
  .swiper-button-next {
    right: -2rem;
  }
}
@media (max-width: 768px) {
  .swiper-button-prev {
    left: -1.5rem;
  }
  .swiper-button-next {
    right: -1.5rem;
  }
}
@media (max-width: 640px) {
  .swiper-button-prev {
    left: 0.5rem;
  }
  .swiper-button-next {
    right: 0.5rem;
  }
}

/* ======================
  HOVER EFFECTS
====================== */
.swiper-button-prev:hover,
.swiper-button-next:hover {
  background: var(--color-secondary);
  color: var(--color-primary-bg);
  border-color: var(--color-secondary);
}

.dark .swiper-button-prev:hover,
.dark .swiper-button-next:hover {
  background: var(--color-secondary-dark);
  color: var(--color-primary-bg-dark);
}

/* ======================
  SWIPER PAGINATION BULLETS
====================== */
.swiper-pagination {
  bottom: -2.5rem !important;
  text-align: center;
}

.swiper-pagination-bullet {
  background: var(--color-trinary) !important;
  opacity: 0.8 !important;
  width: 10px !important;
  height: 10px !important;
  margin: 0 4px !important;
}

.swiper-pagination-bullet-active {
  background: var(--color-secondary) !important;
  opacity: 1 !important;
  transform: scale(1.2);
}

.dark .swiper-pagination-bullet {
  background: var(--color-trinary-dark) !important;
}

.dark .swiper-pagination-bullet-active {
  background: var(--color-secondary-dark) !important;
}

/* ======================
  LOADER PAGE
====================== */
.pl {
  width: 6em;
  height: 6em;
}
.pl__ring {
  animation: ringA 2s linear infinite;
}
.ring-a {
  stroke: var(--color-secondary);
}
.ring-b {
  animation-name: ringB;
  stroke: var(--color-primary);
}
.ring-c {
  animation-name: ringC;
  stroke: var(--color-trinary);
}
.ring-d {
  animation-name: ringD;
  stroke: var(--color-trinary);
}

.dark .pl__ring--a {
  stroke: var(--color-secondary-dark);
}
.dark .pl__ring--b {
  stroke: var(--color-secondary-light-dark);
}
.dark .pl__ring--c,
.dark .pl__ring--d {
  stroke: var(--color-trinary-dark);
}

/* ======================
  LOADER ANIMATION KEYFRAMES
====================== */
@keyframes ringA {
  from,
  4% {
    stroke-dasharray: 0 660;
    stroke-width: 20;
    stroke-dashoffset: -330;
  }
  12% {
    stroke-dasharray: 60 600;
    stroke-width: 30;
    stroke-dashoffset: -335;
  }
  32% {
    stroke-dasharray: 60 600;
    stroke-width: 30;
    stroke-dashoffset: -595;
  }
  40%,
  54% {
    stroke-dasharray: 0 660;
    stroke-width: 20;
    stroke-dashoffset: -660;
  }
  62% {
    stroke-dasharray: 60 600;
    stroke-width: 30;
    stroke-dashoffset: -665;
  }
  82% {
    stroke-dasharray: 60 600;
    stroke-width: 30;
    stroke-dashoffset: -925;
  }
  90%,
  to {
    stroke-dasharray: 0 660;
    stroke-width: 20;
    stroke-dashoffset: -990;
  }
}

@keyframes ringB {
  from,
  12% {
    stroke-dasharray: 0 220;
    stroke-width: 20;
    stroke-dashoffset: -110;
  }
  20% {
    stroke-dasharray: 20 200;
    stroke-width: 30;
    stroke-dashoffset: -115;
  }
  40% {
    stroke-dasharray: 20 200;
    stroke-width: 30;
    stroke-dashoffset: -195;
  }
  48%,
  62% {
    stroke-dasharray: 0 220;
    stroke-width: 20;
    stroke-dashoffset: -220;
  }
  70% {
    stroke-dasharray: 20 200;
    stroke-width: 30;
    stroke-dashoffset: -225;
  }
  90% {
    stroke-dasharray: 20 200;
    stroke-width: 30;
    stroke-dashoffset: -305;
  }
  98%,
  to {
    stroke-dasharray: 0 220;
    stroke-width: 20;
    stroke-dashoffset: -330;
  }
}

@keyframes ringC {
  from {
    stroke-dasharray: 0 440;
    stroke-width: 20;
    stroke-dashoffset: 0;
  }
  8% {
    stroke-dasharray: 40 400;
    stroke-width: 30;
    stroke-dashoffset: -5;
  }
  28% {
    stroke-dasharray: 40 400;
    stroke-width: 30;
    stroke-dashoffset: -175;
  }
  36%,
  58% {
    stroke-dasharray: 0 440;
    stroke-width: 20;
    stroke-dashoffset: -220;
  }
  66% {
    stroke-dasharray: 40 400;
    stroke-width: 30;
    stroke-dashoffset: -225;
  }
  86% {
    stroke-dasharray: 40 400;
    stroke-width: 30;
    stroke-dashoffset: -395;
  }
  94%,
  to {
    stroke-dasharray: 0 440;
    stroke-width: 20;
    stroke-dashoffset: -440;
  }
}

@keyframes ringD {
  from,
  8% {
    stroke-dasharray: 0 440;
    stroke-width: 20;
    stroke-dashoffset: 0;
  }
  16% {
    stroke-dasharray: 40 400;
    stroke-width: 30;
    stroke-dashoffset: -5;
  }
  36% {
    stroke-dasharray: 40 400;
    stroke-width: 30;
    stroke-dashoffset: -175;
  }
  44%,
  50% {
    stroke-dasharray: 0 440;
    stroke-width: 20;
    stroke-dashoffset: -220;
  }
  58% {
    stroke-dasharray: 40 400;
    stroke-width: 30;
    stroke-dashoffset: -225;
  }
  78% {
    stroke-dasharray: 40 400;
    stroke-width: 30;
    stroke-dashoffset: -395;
  }
  86%,
  to {
    stroke-dasharray: 0 440;
    stroke-width: 20;
    stroke-dashoffset: -440;
  }
}

/* ======================
  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);
}

#scrollTopBtn:hover {
  transform: translateY(0) scale(1.15);
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
