/* Minimal overrides. Keep Tailwind CDN as primary styling. */

/* Color Palette - Tech & Energy Theme
   Primary Blue: #0067FE
   Deep Navy: #0A192F
   Aqua Accent: #00C3FF
   Soft Grey: #E8E8E8
*/

/* Example: fine-tune focus ring color if desired */
:focus-visible {
  outline-color: #0067FE;
}

/* Accessible skip link: visible on focus */
.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
  width: auto;
  height: auto;
  padding: 0.5rem 0.75rem;
  background: #0067FE;
  color: #fff;
  border-radius: 0.5rem;
  z-index: 50;
}

/* Trust Section Logo Carousel Styles */
.trust-logo-carousel-wrapper {
  overflow: hidden;
  position: relative;
  width: 100%;
}

.trust-logo-carousel {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  animation: trust-scroll 15s linear infinite;
  will-change: transform;
  width: fit-content;
}

.trust-logo-item {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.trust-logo-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 3.5rem;
  max-width: 160px;
}

.trust-logo-img {
  height: 3.5rem;
  width: auto;
  max-width: 160px;
  object-fit: contain;
  opacity: 0.9;
  display: block;
  /* Use brightness and invert to create white logos */
  /* This should preserve transparency in most browsers */
  filter: brightness(0) invert(1);
  -webkit-filter: brightness(0) invert(1);
  /* Force the browser to respect transparency */
  image-rendering: auto;
  /* Ensure proper rendering */
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

@keyframes trust-scroll {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-50%);
  }
}

/* Gradient overlays for fade effect on both ends */
.trust-logo-carousel-gradient-left,
.trust-logo-carousel-gradient-right {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 80px;
  z-index: 10;
  pointer-events: none;
}

.trust-logo-carousel-gradient-left {
  left: 0;
  background: linear-gradient(to right, rgba(10, 15, 30, 1) 0%, rgba(10, 15, 30, 0) 100%);
}

.trust-logo-carousel-gradient-right {
  right: 0;
  background: linear-gradient(to left, rgba(10, 15, 30, 1) 0%, rgba(10, 15, 30, 0) 100%);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .trust-logo-carousel {
    gap: 2rem;
    animation-duration: 12.5s;
  }

  .trust-logo-img {
    height: 3rem;
    max-width: 140px;
  }

  .trust-logo-wrapper {
    height: 3rem;
    max-width: 140px;
  }

  .trust-logo-item {
    padding: 0;
  }

  .trust-logo-carousel-gradient-left,
  .trust-logo-carousel-gradient-right {
    width: 60px;
  }
}

/* FAQ Accordion Styles */
.faq-item {
  transition: all 0.3s ease;
}

.faq-question {
  position: relative;
}

.faq-question::-webkit-details-marker {
  display: none;
}

.faq-question::marker {
  display: none;
}

.faq-answer {
  animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Hover effect for FAQ items */
.faq-item summary:hover>div {
  background-color: rgba(0, 103, 254, 0.12) !important;
  transition: background-color 0.2s ease;
}

/* Hero Gallery Infinite Scroll Styles */
.hero-gallery-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  max-height: 600px;
  margin: 0;
  padding: 1rem;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

/* vertical column that will scroll */
.hero-gallery-scroll {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  animation: hero-gallery-scroll 18s linear infinite;
  will-change: transform;
}

/* each row holds two cards side by side */
.hero-gallery-row {
  display: flex;
  gap: 0.6rem;
}

/* cards share available width equally */
.hero-gallery-card {
  height: 140px;
  padding: 0.75rem;
  border-radius: 0.85rem;
  background-color: #ffffff;
  border: 1px solid #e5e7eb;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* Search ads take 75% of row width */
.hero-gallery-card-search {
  flex: 3 1 0%;
}

/* Shopping ads take 25% of row width */
.hero-gallery-card-shopping {
  flex: 1 1 0%;
}

/* images never crop, only scale down */
.hero-gallery-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  transform-origin: center;
  transition: transform 0.25s ease;
}

.hero-gallery-card:hover .hero-gallery-img {
  transform: scale(1.04);
}

/* infinite scroll animation: we have two identical sets, so -50% */
@keyframes hero-gallery-scroll {
  0% {
    transform: translateY(0);
  }

  100% {
    transform: translateY(-50%);
  }
}

/* Gradient overlays for fade effect at top and bottom */
.hero-gallery-gradient-top,
.hero-gallery-gradient-bottom {
  position: absolute;
  left: 0;
  right: 0;
  height: 80px;
  z-index: 10;
  pointer-events: none;
}

.hero-gallery-gradient-top {
  top: 0;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0) 100%);
}

.hero-gallery-gradient-bottom {
  bottom: 0;
  background: linear-gradient(to top, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0) 100%);
}

/* responsive tweaks */
@media (max-width: 1024px) {
  .hero-gallery-wrapper {
    max-height: 550px;
    padding: 0.85rem;
  }

  .hero-gallery-card {
    height: 130px;
    padding: 0.65rem;
  }

  .hero-gallery-scroll {
    gap: 0.6rem;
  }
}

@media (max-width: 768px) {
  .hero-gallery-wrapper {
    max-height: 500px;
    padding: 0.75rem;
  }

  .hero-gallery-card {
    height: 120px;
    padding: 0.6rem;
  }
}

/* Footer Styles */
.footer-simple {
  background-color: #0a0f1e;
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
}

/* Scroll Animation Styles */
.scroll-animate {
  opacity: 0;
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.scroll-animate.animate-in {
  opacity: 1;
  transform: translateY(0);
}

/* Fade in from bottom */
.scroll-animate-fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.scroll-animate-fade-up.animate-in {
  opacity: 1;
  transform: translateY(0);
}

/* Fade in from top (for scroll up) */
.scroll-animate-fade-down {
  opacity: 0;
  transform: translateY(-30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.scroll-animate-fade-down.animate-in {
  opacity: 1;
  transform: translateY(0);
}

/* Fade in with slight scale */
.scroll-animate-scale {
  opacity: 0;
  transform: scale(0.95);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.scroll-animate-scale.animate-in {
  opacity: 1;
  transform: scale(1);
}

/* Stagger delay classes for sequential animations */
.scroll-animate-delay-100 {
  transition-delay: 0.1s;
}

.scroll-animate-delay-200 {
  transition-delay: 0.2s;
}

.scroll-animate-delay-300 {
  transition-delay: 0.3s;
}

.scroll-animate-delay-400 {
  transition-delay: 0.4s;
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
  .scroll-animate,
  .scroll-animate-fade-up,
  .scroll-animate-fade-down,
  .scroll-animate-scale {
    opacity: 1;
    transform: none;
    transition: none;
  }
}