/* ==========================================================================
   Variables and Root Settings
   ========================================================================== */
:root {
  /* Font Families */
  --font-heading: "Cabin", sans-serif;
  --font-body: "PT Sans", sans-serif;

  /* Brand Colors */
  --primary-color: #6a11cb;
  --secondary-color: #2575fc;
  --white-color: #ffffff;
  --black-color: #000000;

  /* Grayscale Colors */
  --gray-color: #808080;
  --light-gray-color: #d3d3d3;
  --dark-gray-color: #a9a9a9;

  /* Theme Colors */
  --light-blue-color: #add8e6;
  --dark-blue-color: #00008b;
  --light-green-color: #90ee90;
  --dark-green-color: #006400;
  --light-red-color: #ffb6c1;
  --dark-red-color: #8b0000;
  --light-yellow-color: #f0e68c;
  --dark-yellow-color: #ffd700;
  --light-purple-color: #e6e6fa;
  --dark-purple-color: #800080;
  --light-orange-color: #ffa500;
  --dark-orange-color: #ff8c00;
  --light-pink-color: #ffc0cb;
  --dark-pink-color: #ff1493;
  --light-brown-color: #d2b48c;
  --dark-brown-color: #a52a2a;
  --light-teal-color: #8fbc8f;
  --dark-teal-color: #008080;

  /* Bootstrap Overrides */
  --bs-primary: #6a11cb;
  --bs-primary-rgb: 106, 17, 203;
}

/* ==========================================================================
   Typography
   ========================================================================== */
body {
  font-family: var(--font-body);
}

h1,
h2,
h3,
h4,
h5,
h6,
.uk-heading-small,
.uk-heading-medium,
.uk-heading-large,
.uk-heading-xlarge,
.uk-heading-2xlarge {
  font-family: var(--font-heading);
}

/* Gradient Background */
.gradient-primary {
  background: linear-gradient(
    135deg,
    rgb(106, 17, 203) 0%,
    rgb(76, 10, 146) 100%
  );
}

/* ==========================================================================
   Layout & Structure
   ========================================================================== */
/* Hero section */
.hero-section {
  background-color: #6a11cb;
}

/* Hero image styles */
.hero-image {
  filter: drop-shadow(0 20px 25px rgba(0, 0, 0, 0.4));
  transition: filter 0.3s ease;
}

.hero-image:hover {
  filter: drop-shadow(0 25px 30px rgba(0, 0, 0, 0.5));
}

/* Section padding */
section {
  padding: 100px 0;
  padding-left: 2rem;
  padding-right: 2rem;
}

/* Scroll margin for anchor points */
[id] {
  scroll-margin-top: 1.5rem;
}

/* ==========================================================================
   Navigation
   ========================================================================== */
/* Navbar styles */
.navbar {
  transition: all 0.3s ease;
}

.navbar.scrolled {
  background: linear-gradient(
      rgba(111, 66, 193, 0.65),
      rgba(111, 66, 193, 0.65)
    ),
    linear-gradient(rgba(111, 66, 193, 0.85), rgba(111, 66, 193, 0.85));

  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);

  padding: 0.5rem 0;
  box-shadow: 4px 4px 8px rgba(0, 0, 0, 0.25) !important;
}

.navbar-dark .navbar-nav .nav-link {
  color: rgba(255, 255, 255, 0.9) !important;
  padding: 0.5rem 1rem;
}

.navbar-dark .navbar-nav .nav-link:hover {
  color: #fff !important;
}

/* Navbar Link Padding - Desktop */
@media (min-width: 992px) {
  .navbar .nav-link {
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
  }
}

/* ==========================================================================
   Mobile Navigation
   ========================================================================== */
@media (max-width: 991.98px) {
  .offcanvas {
    background: linear-gradient(
      135deg,
      rgba(106, 17, 203, 0.35) 0%,
      rgba(76, 10, 146, 0.35) 100%
    );
    height: 100vh !important;
  }

  .offcanvas-header {
    background: linear-gradient(
      135deg,
      rgba(106, 17, 203, 0.5) 0%,
      rgba(76, 10, 146, 0.5) 100%
    );
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .offcanvas-body {
    background: linear-gradient(
      135deg,
      rgba(106, 17, 203, 0.75) 0%,
      rgba(76, 10, 146, 0.75) 100%
    );
    height: 100%;
  }

  .offcanvas .offcanvas-title,
  .offcanvas .btn-close {
    color: #ffffff !important;
    filter: brightness(0) invert(1);
  }

  .offcanvas .navbar-nav .nav-link,
  .offcanvas .navbar-nav .nav-link:hover {
    color: rgba(255, 255, 255, 0.9) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
  }

  .offcanvas .navbar-nav .nav-link:hover {
    color: #ffffff !important;
    background-color: rgba(255, 255, 255, 0.1);
  }

  .offcanvas .navbar-nav .nav-item:first-child .nav-link:hover {
    border-top-left-radius: 0.5rem;
    border-top-right-radius: 0.5rem;
  }

  .offcanvas .navbar-nav .nav-item:last-child .nav-link:hover {
    border-bottom-left-radius: 0.5rem;
    border-bottom-right-radius: 0.5rem;
  }

  .offcanvas .navbar-nav .nav-item:last-child .nav-link {
    border-bottom: none;
  }
}

/* Hide scrollbar when offcanvas is open */
body.offcanvas-open {
  overflow: hidden;
  padding-right: var(--bs-offcanvas-padding-right);
}

/* ==========================================================================
   Buttons & Links
   ========================================================================== */
/* Custom button styles */
.btn-primary {
  background: rgb(106, 17, 203);
  border: none;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.btn-primary.active,
.btn-primary:focus-visible,
.btn-primary:focus-within {
  background: rgb(76, 10, 146) !important;
  border: none !important;
  box-shadow: 0 0 0 0.25rem rgba(106, 17, 203, 0.25) !important;
}

.btn-primary:disabled,
.btn-primary.disabled {
  background: rgb(106, 17, 203);
  opacity: 0.65;
}

/* Tab styles */
.nav-tabs {
  border-bottom: 1px solid rgba(106, 17, 203, 0.2);
  position: relative;
  z-index: 1;
}

.nav-tabs .nav-link {
  color: rgb(106, 17, 203);
  border: none;
  padding: 0.75rem 1.25rem;
  transition: all 0.3s ease;
  position: relative;
}

.nav-tabs .nav-link:hover {
  color: rgb(76, 10, 146);
  border: none;
  background-color: rgba(106, 17, 203, 0.05);
}

.nav-tabs .nav-link.active {
  color: rgb(76, 10, 146);
  background-color: transparent;
  border: none;
  font-weight: 500;
}

.nav-tabs .nav-link.active::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background-color: rgb(106, 17, 203);
  transform: translateZ(0);
  backface-visibility: hidden;
}

.nav-tabs .nav-link:focus {
  border: none;
  box-shadow: none;
}

.btn-outline-light {
  color: var(--bs-light);
}

/* Custom link styles */
a {
  color: #6a11cb;
  transition: color 0.3s ease;
}

a:hover {
  color: rgb(76, 10, 146);
}

.text-primary,
.btn-link {
  color: #6a11cb;
}

/* ==========================================================================
   Forms & Inputs
   ========================================================================== */
/* Custom form focus styles */
.form-control:focus {
  border-color: #6a11cb;
  box-shadow: 0 0 0 0.25rem rgba(106, 17, 203, 0.25);
}

/* ==========================================================================
   Cards & Components
   ========================================================================== */
/* Card Hover Animations */
.card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  transform: translateZ(0);
  backface-visibility: hidden;
  will-change: transform;
}

.card:hover {
  transform: translateY(-10px);
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

/* Terminal Card Styles */
.card-body[style*="font-family: 'Courier New'"] {
  overflow: scroll;
  transition: none;
}

.card-body[style*="font-family: 'Courier New'"]:hover {
  transform: none;
  box-shadow: none;
}

/* Terminal Card Header */
.card-header.bg-dark {
  background: linear-gradient(
    135deg,
    rgb(106, 17, 203) 0%,
    rgb(76, 10, 146) 100%
  ) !important;
}

/* ==========================================================================
   Terminal & Code Display
   ========================================================================== */
/* Custom Scrollbar for Terminal Cards */
.card-body[style*="font-family: 'Courier New'"]::-webkit-scrollbar {
  height: 8px;
  background-color: #1a1a1a;
}

.card-body[style*="font-family: 'Courier New'"]::-webkit-scrollbar-thumb {
  background-color: #444;
  border-radius: 4px;
}

.card-body[style*="font-family: 'Courier New'"]::-webkit-scrollbar-thumb:hover {
  background-color: #555;
}

/* Firefox Scrollbar */
.card-body[style*="font-family: 'Courier New'"] {
  scrollbar-width: thin;
  scrollbar-color: #444 #1a1a1a;
}

/* ==========================================================================
   Animations & Effects
   ========================================================================== */
/* Scroll to explore button */
.scroll-explore {
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-10px);
  }
  60% {
    transform: translateY(-5px);
  }
}

/* ==========================================================================
   Typing Animation
   ========================================================================== */
/* Typing animation styles */
.typing-container {
  display: inline;
  position: relative;
}

@keyframes blink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
}

/* ==========================================================================
   Nano Cube Animation
   ========================================================================== */
.nano-cube-container {
  flex-shrink: 0;
  position: relative;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0;
  perspective: 1000px;
}

.cube-3d {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  animation: rotate 10s linear infinite;
}

.cube-face {
  position: absolute;
  width: 100%;
  height: 100%;
  border: 2px solid;
  box-sizing: border-box;
  opacity: 0.6;
  transition: opacity 0.3s ease;
}

.cube-face:hover {
  opacity: 0.8;
}

.cube-face.front {
  transform: translateZ(10px);
  border-color: #f7f7f7;
}

.cube-face.back {
  transform: translateZ(-10px) rotateY(180deg);
  border-color: #f7f7f7;
}

.cube-face.right {
  transform: translateX(10px) rotateY(90deg);
  border-color: #f7f7f7;
}

.cube-face.left {
  transform: translateX(-10px) rotateY(-90deg);
  border-color: #f7f7f7;
}

.cube-face.top {
  transform: translateY(-10px) rotateX(90deg);
  border-color: #f7f7f7;
}

.cube-face.bottom {
  transform: translateY(10px) rotateX(-90deg);
  border-color: #f7f7f7;
}

@keyframes rotate {
  0% {
    transform: rotateX(0) rotateY(0) rotateZ(0);
  }
  100% {
    transform: rotateX(360deg) rotateY(360deg) rotateZ(360deg);
  }
}

/* ==========================================================================
   Carousel & Sliders
   ========================================================================== */
/* Carousel Navigation Buttons */
.carousel-control-prev,
.carousel-control-next {
  width: 35px;
  height: 35px;
  background-color: rgba(106, 17, 203, 0.8);
  border-radius: 50%;
  top: 50%;
  transform: translateY(-50%);
  margin: 0 1rem;
  opacity: 0.8;
  transition: all 0.3s ease;
}

.carousel-control-prev {
  left: 0;
}

.carousel-control-next {
  right: 0;
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
  background-color: rgba(106, 17, 203, 1);
  opacity: 1;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
  width: 24px;
  height: 24px;
}

.carousel-caption {
  background-color: rgba(255, 255, 255, 0.85);
}

/* ==========================================================================
   Footer
   ========================================================================== */
footer {
  background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
  color: #fff;
  padding: 4rem 0 2rem;
  padding-left: 2rem;
  padding-right: 2rem;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: color 0.3s ease;
  display: block;
  margin-bottom: 0.5rem;
}

.footer-links a:hover {
  color: #fff;
}

/* ==========================================================================
   Media Queries
   ========================================================================== */
/* Mobile image sizing */
@media (max-width: 768px) {
  .hero-image {
    width: 50% !important;
  }
}

/* Carousel controls on mobile */
@media (max-width: 768px) {
  .carousel-control-prev,
  .carousel-control-next {
    width: 40px;
    height: 40px;
    margin: 0 0.5rem;
  }

  .carousel-control-prev-icon,
  .carousel-control-next-icon {
    width: 20px;
    height: 20px;
  }
}

/* Demo Section Mobile Styles */
@media (max-width: 768px) {
  #demo .col-lg-6 {
    text-align: center;
  }

  #demo .display-4 {
    font-size: 2.5rem;
  }

  #demo .lead {
    font-size: 1.1rem;
  }

  .demo-features {
    text-align: left;
    padding-left: 0;
    margin: 0 auto;
    max-width: 300px;
  }

  .demo-feature-item {
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    margin-bottom: 1rem;
    text-align: left;
  }

  .demo-feature-item i {
    margin-right: 0.5rem;
    flex-shrink: 0;
    margin-top: 0.2rem;
  }
}

/* Responsive padding */
@media (max-width: 768px) {
  #hero {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }

  section {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }

  footer {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

/* ==========================================================================
   Contact Page Styles
   ========================================================================== */
/* Contact form submit button */
.btn-primary:disabled {
  background-color: #6f42c1 !important;
  border-color: #6f42c1 !important;
  opacity: 0.65;
}

.btn-primary:disabled:hover {
  background-color: #6f42c1 !important;
  border-color: #6f42c1 !important;
  opacity: 0.65;
}

.spinner-border {
  color: #fff !important;
}

/* FAQ Accordion styles */
.accordion-body,
.accordion-collapse.show .accordion-body,
.accordion-button:not(.collapsed) + .accordion-collapse .accordion-body {
  color: #212529 !important;
  visibility: visible !important;
  opacity: 1 !important;
  display: block !important;
}

.accordion-button:not(.collapsed) {
  background-color: rgba(111, 66, 193, 0.1) !important;
  color: #6f42c1 !important;
}

.accordion-button:focus {
  box-shadow: 0 0 0 0.25rem rgba(111, 66, 193, 0.25) !important;
}

.accordion-button::after {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%236f42c1'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e") !important;
}

.cursor {
  display: inline-block;
  width: 2px;
  height: 1em;
  background-color: #fff;
  margin-left: 2px;
  vertical-align: middle;
  animation: blink 1s infinite;
  white-space: nowrap;
}

@keyframes blink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
}

.hero-title {
  color: #fff !important;
  opacity: 1 !important;
  visibility: visible !important;
}
