/* =============================================================================
   VARIÁVEIS CSS CUSTOMIZADAS
   ============================================================================= */

:root {
  /* Bordas */
  --bs-border-radius: 0;
  --bs-border-radius-sm: 0;
  --bs-border-radius-lg: 0.5rem;
  --bs-border-radius-xl: 0;
  --bs-border-radius-xxl: 0;
  --custom-border-radius: 8px;
  --custom-border-radius-lg: 12px;

  /* Cores do Sistema */
  --bs-primary: #2a52be;
  --bs-secondary: #666666;
  --bs-success: #107c10;
  --bs-danger: #d13438;
  --bs-warning: #ffaa44;
  --bs-info: #018786;
  --bs-dark: #1f1f1f;
  --bs-light: #f3f3f3;
  --bs-body-bg: #ffffff;
  --bs-body-color: #1f1f1f;
  --bs-light-rgb: 250, 250, 250;
  --bs-dark-rgb: 20, 20, 20;

  /* Cores Customizadas */
  --bs-custom-bg: #0d1126;
  --bs-sidebar-bg-dark: #222222;
  --bs-link-bg-dark: #d96e30;
  --bs-link-hover-bg-dark: #ff9e00;

  /* Componentes */
  --custom-card-border: 1px solid #ddd;
  --custom-sidebar-border: 1px solid #ccc;
  --custom-navbar-border: 2px solid var(--bs-dark);
  --custom-dropdown-border: 1px solid var(--bs-dark);

  /* Transições */
  --transition-smooth: 0.3s ease;
  --transition-carousel: 0.5s ease-in-out;
  --transition-color: color 0.2s;

  /* Espaçamentos */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;

  /* Tamanhos */
  --logo-height: 3rem;
  --hero-height: 70vh;
  --carousel-control-size: 50px;
  --scrollbar-width: 8px;

  /* Shadows e Efeitos */
  --text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  --text-shadow-light: 1px 1px 2px rgba(0, 0, 0, 0.5);
  --overlay-dark: rgba(0, 0, 0, 0.5);
  --overlay-light: rgba(0, 0, 0, 0.02);
}

/* =============================================================================
   RESET E CONFIGURAÇÕES GLOBAIS
   ============================================================================= */

/* Remover sombras de todos os componentes Bootstrap */
.btn,
.card,
.modal-content,
.dropdown-menu,
.navbar,
.input-group,
.form-control,
.alert,
.list-group-item,
.toast,
.popover,
.tooltip {
  box-shadow: none !important;
}

/* Remover border-radius padrão dos componentes */
.btn,
.form-control,
.input-group,
.navbar,
.dropdown-menu,
.card,
.modal-content,
.alert,
.list-group-item,
.toast {
  border-radius: 0 !important;
}

/* =============================================================================
   TIPOGRAFIA E TEXTO
   ============================================================================= */

body {
  scrollbar-width: thin;
  scrollbar-color: var(--bs-dark) var(--bs-light);
}

a {
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

article p {
  text-align: justify;
  hyphens: auto;
  -webkit-hyphens: auto;
  -ms-hyphens: auto;
  text-justify: inter-word;
}

.text-justify {
  text-align: justify;
  hyphens: auto;
  -webkit-hyphens: auto;
  -ms-hyphens: auto;
  text-justify: inter-word;
}

/* =============================================================================
   SCROLLBAR CUSTOMIZADO
   ============================================================================= */

body::-webkit-scrollbar {
  width: var(--scrollbar-width);
}

body::-webkit-scrollbar-track {
  background: var(--bs-light);
}

body::-webkit-scrollbar-thumb {
  background-color: var(--bs-dark);
}

/* =============================================================================
   COMPONENTES BOOTSTRAP CUSTOMIZADOS
   ============================================================================= */

/* Botões */
.btn {
  border-width: 1px;
  background-image: none;
}

.btn:focus,
.btn:hover {
  filter: brightness(95%);
}

/* Formulários */
.form-control {
  border-width: 1px;
}

/* Navegação */
.navbar {
  border-bottom: var(--custom-navbar-border);
}

.nav-link:hover {
  filter: brightness(95%);
}

/* Dropdowns */
.dropdown-menu {
  border: var(--custom-dropdown-border);
}

.dropdown-item:hover {
  filter: brightness(95%);
}

/* Cards */
.card {
  border: var(--custom-card-border);
  border-radius: var(--custom-border-radius);
}

.img-rounded,
.div-rounded {
  border-radius: var(--custom-border-radius);
}

/* Tooltips */
.tooltip-inner {
  background-color: var(--bs-dark);
  color: var(--bs-light);
  border-radius: 0;
}

/* =============================================================================
   CLASSES UTILITÁRIAS CUSTOMIZADAS
   ============================================================================= */

.index {
  background-color: color-mix(in srgb, var(--bs-body-color) 4%, transparent);
}

.logo {
  max-height: var(--logo-height);
}

.cbg {
  background-color: var(--bs-custom-bg);
}

.div-rounded {
  background-color: #eeeeee;
  border-radius: var(--custom-border-radius-lg);
}

.gradient {
  background-color: var(--bs-body-bg);
  border-radius: var(--custom-border-radius-lg);
}

.sidebar {
  background-color: var(--bs-body-bg);
  border: var(--custom-sidebar-border);
  border-radius: var(--bs-border-radius-lg);
}

/* =============================================================================
   CALLOUTS E COMPONENTES INFORMATIVOS
   ============================================================================= */

.callout {
  padding: 1.25rem;
  margin: var(--spacing-md) 0;
  border-radius: var(--spacing-xs);
}

.callout-info {
  background-color: #f8f9fa;
}

/* =============================================================================
   RODAPÉ DO AUTOR
   ============================================================================= */

.author-footer {
  background: var(--overlay-light);
  padding: var(--spacing-lg);
  border-radius: var(--bs-border-radius-lg);
}

.social-links a {
  color: #6c757d;
  font-size: 1.25rem;
  transition: var(--transition-color);
}

.social-links a:hover {
  color: var(--bs-primary);
}

.social-links i {
  vertical-align: middle;
}

/* =============================================================================
   EFEITOS VISUAIS E OVERLAYS
   ============================================================================= */

.bg-cover {
  background-size: cover;
  background-position: center;
  width: 100%;
  height: 100%;
}

.overlay-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.7) 30%,
    rgba(0, 0, 0, 0) 100%
  );
}

.effect:hover .overlay-gradient {
  background: var(--overlay-dark);
  transition: background ease;
}

/* =============================================================================
   SEÇÃO HERO E CAROUSEL
   ============================================================================= */

.hero-section {
  position: relative;
  width: 100%;
  height: var(--hero-height);
  overflow: hidden;
}

/* Container do Carousel */
.hero-carousel {
  position: relative;
  width: 100%;
  height: 100%;
}

/* Slides do Carousel */
.carousel-slide {
  position: absolute;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity var(--transition-carousel);
  display: flex;
  align-items: center;
  justify-content: center;
}

.carousel-slide.active {
  opacity: 1;
}

/* Imagem de fundo do carousel */
.carousel-image {
  position: absolute;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  z-index: 1;
}

/* Overlay do carousel */
.carousel-overlay {
  position: absolute;
  width: 100%;
  height: 100%;
  background-color: var(--overlay-dark);
  z-index: 2;
}

/* Conteúdo do slide */
.carousel-content {
  position: relative;
  max-width: 800px;
  padding: var(--spacing-xl);
  color: white;
  text-align: center;
  z-index: 3;
}

.carousel-title {
  font-size: 2.5rem;
  margin-bottom: var(--spacing-md);
  text-shadow: var(--text-shadow);
}

.carousel-title a {
  color: inherit;
  text-decoration: none;
}

.carousel-excerpt {
  font-size: 1.2rem;
  margin-bottom: var(--spacing-lg);
  line-height: 1.5;
  text-shadow: var(--text-shadow-light);
}

.carousel-button:hover {
  background-color: rgba(255, 255, 255, 0.4);
}

/* Controles de navegação do carousel */
.carousel-control {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: var(--carousel-control-size);
  height: var(--carousel-control-size);
  background: rgba(0, 0, 0, 0.3);
  border: none;
  border-radius: 50%;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-smooth);
}

.carousel-control:hover {
  background: rgba(0, 0, 0, 0.6);
}

.carousel-control.prev {
  left: 20px;
}

.carousel-control.next {
  right: 20px;
}

/* Chevrons para navegação */
.chevron {
  display: inline-block;
  width: 20px;
  height: 20px;
  border-top: 3px solid white;
  border-right: 3px solid white;
}

.chevron.left {
  transform: rotate(-135deg);
  margin-right: 3px;
}

.chevron.right {
  transform: rotate(45deg);
  margin-left: 3px;
}

/* =============================================================================
   TEMA ESCURO
   ============================================================================= */

/* Links no tema escuro */
.bg-dark aside a,
.bg-dark main a {
  color: var(--bs-link-bg-dark);
}

.bg-dark aside a:hover,
.bg-dark main a:hover {
  color: var(--bs-link-hover-bg-dark);
  text-decoration: underline;
}

/* Componentes no tema escuro */
.bg-dark .sidebar {
  background-color: var(--bs-sidebar-bg-dark);
  border: 0;
}

.bg-dark .div-rounded {
  background-color: rgba(var(--bs-body-bg-rgb), 0.05);
  border-radius: var(--custom-border-radius-lg);
}

.bg-dark .gradient {
  background-color: #0f0f0f;
}

.bg-dark .callout-info {
  background-color: #373c41;
}

/* Breadcrumbs no tema escuro */
.bg-dark .breadcrumb-item {
  color: rgb(var(--bs-light-rgb), 0.8);
}

.bg-dark .breadcrumb-item + .breadcrumb-item::before {
  color: rgb(var(--bs-light-rgb), 0.8);
}

/* Texto no tema escuro */
.bg-dark .text-muted {
  color: rgba(var(--bs-light-rgb), 0.8) !important;
}

/* Cards no tema escuro */
body.bg-dark .card {
  background-color: rgb(var(--bs-dark-rgb));
  color: rgb(var(--bs-light-rgb));
}

body.bg-dark .card .text-muted {
  color: rgba(var(--bs-light-rgb), 0.6);
}