/* ===================================================================
   Reset & Font
=================================================================== */
body {
  font-family: "Poppins", sans-serif;
  background-color: #f5f8fa;
  color: #333;
}

/* ===================================================================
   Container e Títulos
=================================================================== */
.container {
  max-width: 960px;
  padding: 2rem 1rem;
}

h2 {
  margin-bottom: 1.5rem;
  font-size: 1.75rem;
  color: #1a202c;
}


.roboto-style {
  font-family: "Roboto", sans-serif;
  font-optical-sizing: auto;
  font-weight: <weight>;
  font-style: normal;
  font-variation-settings:
    "wdth" 100;
}

/* ===================================================================
   Nav Tabs
=================================================================== */
.nav-tabs {
  border-bottom: 2px solid #dee2e6;
}

.nav-tabs .nav-link {
  color: #495057;
  padding: 0.75rem 1.25rem;
  margin-right: 0.25rem;
  border: 1px solid transparent;
  border-top-left-radius: 0.375rem;
  border-top-right-radius: 0.375rem;
}
.nav-tabs .nav-link:hover {
  color: #0d6efd;
}
.nav-tabs .nav-link.active {
  color: #0d6efd;
  background-color: #fff;
  border-color: #dee2e6 #dee2e6 #fff;
}

/* ===================================================================
   Tab Panes
=================================================================== */

/* 3) Estilo das abas: padding e borda no conteúdo */
.tab-content > .tab-pane {
  padding: 2rem;
  background-color: #ffffff;
  border: 1px solid #dee2e6;
  border-top: none;
  border-bottom-left-radius: .25rem;
  border-bottom-right-radius: .25rem;
}

/* ===================================================================
   Lista de Notícias
=================================================================== */
.list-group-item {
  margin-bottom: 0.75rem;
  border-radius: 0.375rem;
  transition: background-color 0.2s;
}
.list-group-item:hover {
  background-color: #f1f3f5;
}
.list-group-item h5 {
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
}
.list-group-item p {
  font-size: 0.95rem;
  color: #555;
}
.list-group-item small {
  color: #888;
}

/* ===================================================================
   Formulário de Categorias
=================================================================== */
form#categoriesForm h5 {
  font-size: 1rem;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  color: #1a202c;
}
.form-check {
  margin-bottom: 0.5rem;
}
.form-check-input {
  cursor: pointer;
}
.form-check-label {
  cursor: pointer;
  margin-left: 0.3rem;
  font-size: 0.95rem;
  color: #495057;
}

/* ===================================================================
   Botões
=================================================================== */
.btn-primary {
  background-color: #0d6efd;
  border-color: #0d6efd;
}
.btn-primary:hover {
  background-color: #0b5ed7;
  border-color: #0a58ca;
}
.btn-success {
  background-color: #198754;
  border-color: #198754;
}
.btn-success:hover {
  background-color: #157347;
  border-color: #146c43;
}

/* ===================================================================
   Formulário de Configurações
=================================================================== */
form[action="update_profile.php"] .form-group {
  margin-bottom: 1rem;
}
form[action="update_profile.php"] label {
  font-weight: 500;
  margin-bottom: 0.25rem;
}



/* 2) Desktop: container com 75% da largura */
@media (min-width: 992px) {
  .container {
    max-width: 75% !important;
  }
}


/* 4) Mobile friendliness */
@media (max-width: 767.98px) {
  /* Faz as tabs ocuparem melhor o espaço */
  .nav-tabs {
    cursor: pointer;
    cursor: hand;    
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
  }
  .nav-tabs .nav-item {
    flex: 1 1 50%;
    text-align: center;
  }
  .nav-tabs .nav-link {
    font-size: 0.9rem;
    padding: .5rem .75rem;
  }

  /* Formulários e listas */
  .form-check {
    margin-bottom: 0.75rem;
  }
  .form-check-label {
    font-size: 0.95rem;
  }
  .list-group-item h5 {
    font-size: 1rem;
  }
  .list-group-item p {
    font-size: 0.9rem;
  }
}

/* 5) Ajustes gerais de espaçamento */
.tab-content {
  margin-top: 1.5rem;
}

/* header do profile */
.profile-header {
  background-color: #fff;
}
@media (max-width: 767.98px) {
  .profile-header .container {
    flex-direction: column;
    align-items: flex-start !important;
  }
  .profile-header .btn {
    margin-top: .75rem;
  }
}

.user-header {
  border-bottom: 1px solid #ddd;
}


/* ----- Estilos para o Accordion de Notícias ----- */

/* Espaço entre os painéis */
.accordion-item + .accordion-item {
  margin-top: 1rem;
}

/* Cabeçalho: fonte um pouquinho maior */
.accordion-button {
  font-size: 1.1rem;
  background-color: #f8f9fa;
  border-bottom: 1px solid #dee2e6;
}

/* Remover borda extra do botão quando aberto */
.accordion-button:not(.collapsed) {
  box-shadow: inset 0 -1px 0 rgba(0,0,0,.125);
}

/* Corpo do accordion: separar cada notícia */
.accordion-body .d-flex {
  border-bottom: 1px solid #e9ecef;
  padding-bottom: 1rem;
  margin-bottom: 1rem;
}
.accordion-body .d-flex:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

/* Imagem da notícia */
.accordion-body img {
  border-radius: .25rem;
  border: 1px solid #ddd;
}

.accordion-body a:hover h5 {
  color: #0056b3;
  text-decoration: underline;
}

/* Responsividade: no mobile empilha acima da imagem */
@media (max-width: 576px) {
  .accordion-body .d-flex {
    flex-direction: column;
  }
  .accordion-body img {
    width: 100%;
    height: auto;
    margin-bottom: .75rem;
  }
}

/* Sidebar styling */
.sidebar { min-width: 250px; }
.sidebar .nav-link { padding: 0.5rem 1rem; font-size: 0.95rem; }
.sidebar .nav-link.active, .sidebar .nav-link:hover { background-color: #f1f3f5; color: #0d6efd; }
.main-content { flex-grow: 1; }