/* Estilos Gerais */
:root {
  --primary-color: #4361ee;
  --secondary-color: #3f37c9;
  --accent-color: #4895ef;
  --dark-color: #191C26;
  --light-color: #f8f9fa;
  --success-color: #4cc9f0;
  --danger-color: #f72585;
  --warning-color: #f8961e;
  --info-color: #4895ef;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #f5f7fa;
  color: #333;
  line-height: 1.6;
  padding-top: 20px;
}

/* Container Principal */
.container {
  background-color: white;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  padding: 30px;
  margin-bottom: 40px;
  position: relative;
  overflow: hidden;
}

.container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 5px;
  height: 100%;
  background: linear-gradient(to bottom, var(--primary-color), var(--secondary-color));
}

h1, h2, h3, h4 {
  color: var(--dark-color);
  font-weight: 700;
  margin-bottom: 1.5rem;
}

h2 {
  position: relative;
  padding-bottom: 15px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

h2::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100px;
  height: 3px;
  background: linear-gradient(to right, var(--primary-color), var(--accent-color));
}

/* Cards de Materiais */
.material-card {
  border: none;
  border-radius: 12px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  overflow: hidden;
  background: white;
  margin-bottom: 25px;
  position: relative;
}

.material-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.card-img-container {
  height: 220px;
  overflow: hidden;
  position: relative;
  background: linear-gradient(135deg, #f5f7fa 0%, #e4e8eb 100%);
}

.material-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.material-card:hover .material-img {
  transform: scale(1.05);
}

.card-body {
  padding: 25px;
}

.card-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--dark-color);
}

.card-subtitle {
  font-size: 0.9rem;
  color: #6c757d;
  margin-bottom: 1.25rem;
}

/* Slideshow Profissional */
.material-gallery {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
  background: white;
  margin-bottom: 30px;
}

.main-slider {
  position: relative;
  height: 450px;
  overflow: hidden;
  background: #000;
}

.slide-item {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.6s ease-in-out;
  display: flex;
  align-items: center;
  justify-content: center;
}

.slide-item.active {
  opacity: 1;
  z-index: 1;
}

.slide-item img {
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
}

.thumbnails {
  display: flex;
  padding: 15px;
  background: white;
  overflow-x: auto;
  scrollbar-width: thin;
}

.thumbnails::-webkit-scrollbar {
  height: 6px;
}

.thumbnails::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: 3px;
}

.thumb-item {
  width: 90px;
  height: 90px;
  margin-right: 12px;
  cursor: pointer;
  border: 3px solid transparent;
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.3s ease;
  flex-shrink: 0;
  position: relative;
}

.thumb-item::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.3);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.thumb-item.active, .thumb-item:hover {
  border-color: var(--primary-color);
}

.thumb-item.active::after, .thumb-item:hover::after {
  opacity: 0;
}

.thumb-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Botões */
.btn {
  border-radius: 8px;
  padding: 10px 20px;
  font-weight: 600;
  transition: all 0.3s ease;
  border: none;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.btn-primary {
  background-color: var(--primary-color);
  color: white;
}

.btn-primary:hover {
  background-color: var(--secondary-color);
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(67, 97, 238, 0.25);
}

.btn-outline-secondary {
  border: 1px solid #dee2e6;
}

.btn-outline-secondary:hover {
  background-color: #f8f9fa;
}

.btn-success {
  background-color: var(--success-color);
}

.btn-danger {
  background-color: var(--danger-color);
}

.btn-warning {
  background-color: var(--warning-color);
}

/* Formulários */
.form-control {
  border-radius: 8px;
  padding: 12px 15px;
  border: 1px solid #e0e0e0;
  transition: all 0.3s ease;
}

.form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(67, 97, 238, 0.25);
}

.form-group label {
  font-weight: 600;
  margin-bottom: 8px;
  color: #495057;
}

/* Alertas */
.alert {
  border-radius: 8px;
  padding: 15px 20px;
  border: none;
  font-weight: 500;
}

.alert-info {
  background-color: #e7f5ff;
  color: var(--primary-color);
}

.alert-success {
  background-color: #ebfbee;
  color: #2b8a3e;
}

/* Tabelas */
.table {
  border-collapse: separate;
  border-spacing: 0;
}

.table th {
  background-color: var(--light-color);
  font-weight: 600;
  color: var(--dark-color);
  border: none;
}

.table td, .table th {
  padding: 15px;
  vertical-align: middle;
  border-top: 1px solid #f1f3f5;
}

.table-hover tbody tr:hover {
  background-color: rgba(67, 97, 238, 0.05);
}

/* Responsividade */
@media (max-width: 1200px) {
  .main-slider {
    height: 400px;
  }
  
  .thumb-item {
    width: 80px;
    height: 80px;
  }
}

@media (max-width: 992px) {
  .main-slider {
    height: 350px;
  }
  
  .container {
    padding: 25px;
  }
}

@media (max-width: 768px) {
  .main-slider {
    height: 300px;
  }
  
  .thumb-item {
    width: 70px;
    height: 70px;
  }
  
  .container {
    padding: 20px;
  }
}

@media (max-width: 576px) {
  .main-slider {
    height: 250px;
  }
  
  .thumb-item {
    width: 60px;
    height: 60px;
  }
  
  .btn {
    padding: 8px 15px;
    font-size: 0.9rem;
  }
}

/* Efeitos Especiais */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.material-card {
  animation: fadeIn 0.6s ease forwards;
}

/* Barra de Pesquisa */
.search-container {
  margin: 25px 0;
}

.search-box {
  position: relative;
  max-width: 500px;
  margin: 0 auto;
}

.search-box input {
  width: 100%;
  padding: 12px 20px 12px 45px;
  border: 1px solid #e0e0e0;
  border-radius: 30px;
  font-size: 16px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

.search-box input:focus {
  border-color: var(--primary-color);
  box-shadow: 0 4px 15px rgba(67, 97, 238, 0.15);
}

.search-icon {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  color: #adb5bd;
  font-size: 18px;
}

/* Efeito de loading */
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.loading {
  animation: pulse 1.5s infinite;
  background: #f1f3f5;
  color: transparent;
  border-radius: 4px;
}

/* Rodapé */
.footer {
  text-align: center;
  padding: 20px 0;
  color: #6c757d;
  font-size: 14px;
  border-top: 1px solid #f1f3f5;
  margin-top: 40px;
}

/* Tooltips personalizados */
.tooltip-custom {
  position: relative;
  display: inline-block;
}

.tooltip-custom .tooltip-text {
  visibility: hidden;
  width: 120px;
  background-color: var(--dark-color);
  color: white;
  text-align: center;
  border-radius: 6px;
  padding: 5px;
  position: absolute;
  z-index: 1;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0;
  transition: opacity 0.3s;
}

.tooltip-custom:hover .tooltip-text {
  visibility: visible;
  opacity: 1;
}
/* Barra de Pesquisa */
.search-container {
    position: relative;
    margin-bottom: 20px;
}

.search-container .form-control {
    border-radius: 20px;
    padding-left: 40px;
    height: 45px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.search-container .input-group-append .btn {
    border-radius: 0 20px 20px 0;
    padding: 0 20px;
}

.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    z-index: 1000;
    display: none;
    max-height: 300px;
    overflow-y: auto;
}

.suggestion-item {
    padding: 10px 15px;
    cursor: pointer;
    transition: all 0.2s;
}

.suggestion-item:hover {
    background-color: #f8f9fa;
    color: var(--primary-color);
}

/* Ícone de busca */
.search-container .input-group-prepend {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 4;
}

.search-container .input-group-prepend .input-group-text {
    background: transparent;
    border: none;
    color: #6c757d;
}
/* Barra de Pesquisa */
.search-container {
    position: relative;
}

.search-container .input-group-text {
    border-right: none;
    background-color: white;
}

.search-container .form-control {
    border-left: none;
    padding-left: 0;
}

.search-container .form-control:focus {
    box-shadow: none;
    border-color: #ced4da;
}

.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #dee2e6;
    border-top: none;
    border-radius: 0 0 0.375rem 0.375rem;
    z-index: 1000;
    display: none;
    max-height: 300px;
    overflow-y: auto;
}

.suggestion-item {
    padding: 0.5rem 1rem;
    cursor: pointer;
    transition: all 0.2s;
    border-bottom: 1px solid #f8f9fa;
}

.suggestion-item:hover {
    background-color: #f8f9fa;
    color: #0d6efd;
}

.suggestion-item:last-child {
    border-bottom: none;
}

/* Responsividade */
@media (max-width: 576px) {
    .search-container .btn {
        padding: 0.375rem 0.75rem;
    }
}