@import url(text.css);
@import url(custom.css);
@import url(components/header.css);
@import url(components/carousel.css);
@import url(components/sections.css);
@import url(components/button.css);
@import url(components/footer.css);
@import url(components/video-modal.css);
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Poppins', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  list-style: none;
  text-decoration: none;
  user-select: none;
}

:root {
  color-scheme: light dark;

  /* Declaração das variáveis com light-dark() */
  --primary-color: light-dark(#ad208a, #2362a7);
  --secondary-color: light-dark(#4fa8e0, #ad208a);
  --primary-blue-color: light-dark(#2362a7, #4fa8e0);
  --primary-purple-color: light-dark(#ad208a, #d17ab2);
  --background-color: light-dark(#faf9f7, #2c2c2c);
  --text-color: light-dark(#333, #ccc);
  --disabled-color: light-dark(#707070, #707070);
  --invert-color: invert(1);
  --button-background-color: light-dark(#1a1a1a, #f5f5f5);
  
  /* Additional improved colors */
  --success-color: #28a745;
  --warning-color: #ffc107;
  --danger-color: #dc3545;
  --info-color: #17a2b8;
}

/* Fix for carousels - prevent transitions from affecting them */
.carousel, 
.carousel-cell, 
.carousel-slides,
.carousel-slide, 
.carousel-container, 
.carousel .active,
.carousel-cell.active,
[class*="flickity"],
.carousel * {
  transition: none !important;
  animation: none !important;
}

/* Carousel enhancements */
.carousel-container {
  max-width: 100%;
  overflow: hidden;
}

.carousel {
  position: relative;
}

.carousel-slides {
  position: relative;
  width: 100%;
}

.slide {
  aspect-ratio: 8/3;
  width: 100%;
  display: none;
  transition: opacity 0.5s ease-in-out;
}

.slide.active {
  display: flex;
}

.slide picture {
  width: 100%;
  height: 100%;
  display: block;
}

.slide img {
  width: 100%;
  height: 100%;
  object-fit: fill;
  object-position: center;
}

.carousel-button {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(0, 0, 0, 0.6);
  color: white;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 10;
}

.carousel-button:hover {
  background-color: rgba(0, 0, 0, 0.8);
}

.carousel-button.prev {
  left: 15px;
}

.carousel-button.next {
  right: 15px;
}

.carousel-indicators {
  position: absolute;
  bottom: 15px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 10;
}

.indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.5);
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

.indicator.active {
  background-color: white;
  transform: scale(1.2);
}

@media (max-width: 768px) {
  .carousel-button {
    width: 30px;
    height: 30px;
  }
  
  .indicator {
    width: 8px;
    height: 8px;
  }
}

/* Theme-specific colors using classes on body */
body.light-theme {
  --primary-color: #ad208a;
  --secondary-color: #4fa8e0;
  --primary-blue-color: #2362a7;
  --primary-purple-color: #ad208a;
  --background-color: #faf9f7;
  --text-color: #333;
  --disabled-color: #707070;
  --invert-color: invert(1);
  --button-background-color: #1a1a1a;
}

body.dark-theme {
  --primary-color: #2362a7;
  --secondary-color: #ad208a;
  --primary-blue-color: #4fa8e0;
  --primary-purple-color: #d17ab2;
  --background-color: #2c2c2c;
  --text-color: #ccc;
  --disabled-color: #707070;
  --invert-color: invert(0);
  --button-background-color: #f5f5f5;
}

@media (prefers-color-scheme: dark) {
  :root {
    --invert-color: invert(0);
  }
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--background-color);
  color: var(--text-color);
  height: 100dvh;
  width: 100vw;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  overflow-x: hidden;
  /* Smooth transition only for theme colors */
  transition: background-color 0.3s ease, color 0.3s ease;
}

main {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding: 1rem 4rem;
}

/* Theme toggle button - z-index lower than carousels */
.theme-toggle {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--primary-color);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  z-index: 99; /* Make sure this is lower than carousel z-index */
  border: none;
  opacity: 0.9;
}

.theme-toggle:hover {
  opacity: 1;
}

.theme-toggle i {
  font-size: 20px;
}

@media screen and (max-width: 768px) {
  * {
    font-size: 14px;
  }
  main {
    padding: 1rem;
  }
  
  .theme-toggle {
    width: 35px;
    height: 35px;
    bottom: 15px;
    right: 15px;
  }
}

@media screen and (max-width: 480px) {
  * {
    font-size: 12px;
  }
}
