/* Estilos para Concursos TI - O Complemento de Dois */

/* Importando fontes */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&family=Roboto:wght@300;400;500;700&display=swap');
@import url('https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.1/font/bootstrap-icons.css');

/* Variáveis de cores */
:root {
  --primary-color: #3498db;
  --primary-dark: #2980b9;
  --secondary-color: #2c3e50;
  --accent-color: #e74c3c;
  --light-bg: #f8f9fa;
  --dark-bg: #343a40;
  --text-color: #333;
  --light-text: #f8f9fa;
  --border-color: #dee2e6;
  --success-color: #28a745;
  --warning-color: #ffc107;
  --info-color: #17a2b8;
}

/* Reset e estilos gerais */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Roboto', sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--light-bg);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  margin-bottom: 1rem;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: all 0.3s ease;
}

a:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

/* Header */
.masthead {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  padding: 3rem 0;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.masthead::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><rect fill="rgba(255,255,255,0.05)" width="50" height="50" x="0" y="0" /><rect fill="rgba(255,255,255,0.05)" width="50" height="50" x="50" y="50" /></svg>');
  opacity: 0.3;
}

.masthead-heading {
  font-size: 2.5rem;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
  position: relative;
  z-index: 2;
}

/* Navbar */
.navbar {
  padding: 0.8rem 0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.navbar-brand img {
  transition: transform 0.3s ease;
}

.navbar-brand:hover img {
  transform: scale(1.1);
}

.navbar-nav .nav-link {
  font-weight: 500;
  padding: 0.5rem 1rem;
  margin: 0 0.2rem;
  border-radius: 4px;
  transition: all 0.3s;
}

.navbar-nav .nav-link.active,
.navbar-nav .nav-link:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

/* Container e seções principais */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

main {
  padding: 2rem 0 4rem;
  min-height: calc(100vh - 280px);
}

main h1 {
  color: var(--secondary-color);
  font-size: 2.2rem;
  margin-bottom: 1.5rem;
  border-bottom: 3px solid var(--primary-color);
  padding-bottom: 0.5rem;
  display: inline-block;
}

main h2.section-title {
  color: var(--primary-dark);
  font-size: 1.5rem;
  margin-top: 1.5rem;
  margin-bottom: 1rem;
  position: relative;
  padding-left: 1rem;
}

main h2.section-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.5rem;
  height: 1rem;
  width: 4px;
  background-color: var(--primary-color);
  border-radius: 2px;
}

/* Cards e estatísticas */
.card {
  border-radius: 8px;
  border: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  margin-bottom: 2rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.12);
}

.card-body {
  padding: 1.5rem;
}

.card p {
  margin-bottom: 0.8rem;
  font-size: 1.05rem;
}

.card p strong {
  color: var(--primary-dark);
  margin-right: 0.5rem;
  font-weight: 600;
}

/* Estatísticas */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.stat-item {
  background: white;
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
  text-align: center;
  transition: all 0.3s ease;
}

.stat-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}

.stat-item .value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.stat-item .label {
  font-size: 0.9rem;
  color: var(--text-color);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Filtros */
.filter-card {
  background: #f8f9fa;
  border-radius: 10px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.filter-active {
  background-color: #e3f2fd;
  border-left: 4px solid #2196f3;
}

/* Formulários */
.form-select {
  padding: 0.75rem 1rem;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  font-size: 1rem;
  box-shadow: none;
  transition: all 0.3s;
}

.form-select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.25rem rgba(52, 152, 219, 0.25);
}

/* Tabelas */
.table {
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  margin-bottom: 2rem;
}

.table th {
  background-color: var(--primary-color);
  color: white;
  font-weight: 500;
  text-transform: uppercase;
  font-size: 0.9rem;
  letter-spacing: 0.5px;
  padding: 1rem;
  text-align: left;
  border: none;
}

.table td {
  padding: 0.8rem 1rem;
  border-top: 1px solid var(--border-color);
  vertical-align: middle;
}

.table tr:nth-child(odd) {
  background-color: rgba(0, 0, 0, 0.02);
}

.table tr:hover {
  background-color: rgba(52, 152, 219, 0.05);
}

.table a {
  display: inline-block;
  color: var(--primary-color);
  font-weight: 500;
}

.table a:hover {
  text-decoration: underline;
}

/* Alerta */
.alert {
  border-radius: 8px;
  padding: 1.25rem;
  margin-bottom: 2rem;
  border: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.alert-info {
  background-color: rgba(23, 162, 184, 0.1);
  border-left: 4px solid var(--info-color);
}

.alert h5 {
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
  color: var(--info-color);
}

.alert h5 i {
  margin-right: 0.5rem;
  font-size: 1.2rem;
}

.alert ol {
  padding-left: 1.5rem;
  margin-bottom: 0;
}

.alert li {
  margin-bottom: 0.5rem;
}

.alert li:last-child {
  margin-bottom: 0;
}

/* Loading spinner */
.spinner-border {
  width: 3rem;
  height: 3rem;
  color: var(--primary-color);
}

/* Lista completa toggle */
#btn-lista-completa {
  font-weight: 500;
  color: var(--primary-color);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
}

#btn-lista-completa:hover {
  text-decoration: underline;
}

#btn-lista-completa::after {
  content: "\F282";
  font-family: "bootstrap-icons", sans-serif;
  margin-left: 0.5rem;
  font-size: 0.9rem;
  transition: transform 0.3s;
}

#btn-lista-completa.active::after {
  transform: rotate(180deg);
}

#lista-completa {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
}

/* Footer */
footer {
  background-color: var(--secondary-color) !important;
  color: white !important;
  padding: 1.5rem 0;
  margin-top: 2rem;
}

footer .p-3 {
  background-color: transparent !important;
}

footer a {
  color: var(--primary-color) !important;
  font-weight: 500;
}

footer a:hover {
  color: white !important;
  text-decoration: underline;
}

/* Responsividade */
@media (max-width: 992px) {
  .masthead-heading {
    font-size: 2rem;
  }

  main h1 {
    font-size: 1.8rem;
  }

  .table th,
  .table td {
    padding: 0.75rem;
  }
}

@media (max-width: 768px) {
  .masthead {
    padding: 2rem 0;
  }

  .masthead-heading {
    font-size: 1.8rem;
  }

  main {
    padding: 1.5rem 0 3rem;
  }

  main h1 {
    font-size: 1.6rem;
  }

  .card {
    margin-bottom: 1.5rem;
  }

  .table-responsive {
    display: block;
    width: 100%;
    overflow-x: auto;
  }
}

@media (max-width: 576px) {
  .masthead-heading {
    font-size: 1.5rem;
  }

  main h1 {
    font-size: 1.4rem;
  }

  .navbar-brand img {
    width: 35px;
    height: 30px;
  }

  .card-body {
    padding: 1.25rem;
  }
}