/* ---------------------------------------------
   RESET BÁSICO
---------------------------------------------*/
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Arial', sans-serif;
}

body {
    background-color: #f7f8fa;
    color: #333;
    line-height: 1.6;

    /* FIX REAL DO NAVBAR */
    padding-top: 80px; /* navbar tem aproximadamente 80px */
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    display: block;
}

button {
    cursor: pointer;
}

/* ---------------------------------------------
   VARIÁVEIS DO TEMA
---------------------------------------------*/
:root {
    --primary-color: #175b43;
    --secondary-color: #f8f9fa;
    --accent-color: #6c757d;
    --highlight-color: #f4a261;
}

/* ---------------------------------------------
   CONTAINERS
---------------------------------------------*/
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
}

main {
    flex: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    padding-bottom: 50px; 
}

/* ---------------------------------------------
   BOTÕES
---------------------------------------------*/
.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 6px;
    border: none;
    font-size: 1rem;
    transition: 0.3s;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: #145037;
}

.btn-secondary,
.btn-danger {
    background-color: var(--primary-color);
    color: #fff;
}

.btn-secondary:hover,
.btn-danger:hover {
    background-color: #124c37;
}

/* Botão "Ver mais projetos" */
.see-more-btn {
    margin: 20px auto 0;
    display: block;
    background: none;
    border: none;
    color: var(--primary-color);
    font-size: 1rem;
    cursor: pointer;
    transition: 0.2s;
}

.see-more-btn:hover {
    text-decoration: underline;
}
.btn-disabled {
    background: #aaa !important;
    cursor: not-allowed !important;
    opacity: 0.7;
}
.btn-sair {
    background-color: #d9534f !important;
    color: white !important;
}

.btn-sair:hover {
    background-color: #c9302c !important;
}

/* ---------------------------------------------
   PROJECT CARDS
---------------------------------------------*/
.project-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: #fff;
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    transition: 0.2s;
    height: 320px;
}

.project-card:hover {
    transform: translateY(-3px);
}

.project-title {
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 6px;
    color: #222;
}

.project-description {
    font-size: 0.9rem;
    color: #555;
    margin-bottom: 10px;

    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;

    overflow: hidden;
    text-overflow: ellipsis;
}

.link-more {
    color: var(--primary-color);
    font-weight: 500;
    cursor: pointer;
    display: inline-block;
    margin-top: 10px;
    transition: 0.2s;
}

.link-more:hover {
    text-decoration: underline;
}

.project-progress {
    width: 100%;
    height: 8px;
    background: #ddd;
    border-radius: 10px;
    margin: 8px 0;
}

.project-progress-filled {
    height: 100%;
    background: var(--highlight-color);
    border-radius: 10px;
    width: 0%;
    transition: width 0.4s ease-in-out;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

@media (max-width: 992px) {
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .projects-grid {
        grid-template-columns: 1fr;
    }
}

/* ---------------------------------------------
   FORMULÁRIOS
---------------------------------------------*/
input, textarea, select {
    width: 100%;
    padding: 10px;
    margin: 6px 0 12px;
    border-radius: 6px;
    border: 1px solid #ccc;
}

textarea {
    resize: vertical;
}

h1, h2, h3, h4 {
    margin-bottom: 15px;
    color: #222;
}

/* ---------------------------------------------
   NAVBAR
---------------------------------------------*/

header {
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 9999;
    background: white;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    min-height: 80px; /* evita salto visual antes do JS carregar */
}

.top-header {
    width: 100%;
    padding: 14px 16px;
    border-bottom: 1px solid #ddd;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    font-weight: 300;
    font-size: 1.3rem;
}

.logo-green { color: var(--primary-color); }
.logo-orange { color: var(--highlight-color); }

/* Menu */
.nav-links {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 24px;
}

.nav-links a {
    color: #555;
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    transition: 0.2s;
}

.nav-links a:hover {
    color: var(--highlight-color);
}

/* ===== AVATAR FIXO NO NAVBAR ===== */
/* garante tamanho fixo e impede shrink/grow */
.nav-links .avatar,
.user-btn .avatar,
.dropdown .avatar {
  width: 36px;              /* tamanho desejado — ajuste se quiser maior/menor */
  height: 36px;
  min-width: 36px;
  min-height: 36px;
  max-width: 36px;
  max-height: 36px;

  border-radius: 50%;
  object-fit: cover;        /* recorta centralizado sem distorcer */
  display: inline-block;

  /* evita que o flex container faça a imagem encolher/esticar */
  flex: 0 0 36px;
}

/* garante que o botão do usuário (dropbtn) não quebre linhas */
.user-btn,
.dropdown .dropbtn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap; /* mantém o nome e o ícone na mesma linha */
}

/* Se ainda houver conflito por CSS externo (bootstrap etc.), usar !important como último recurso */
.nav-links .avatar.fixed,
.user-btn .avatar.fixed {
  width: 36px !important;
  height: 36px !important;
  min-width: 36px !important;
  min-height: 36px !important;
  flex: 0 0 36px !important;
  object-fit: cover !important;
}

/* ---------------------------------------------
   DROPDOWN (USUÁRIO)
---------------------------------------------*/
.nav-links .dropdown {
    position: relative;
    list-style: none;
}

.user-btn {
    cursor: pointer;
    display: flex;
    align-items: center;
}

.user-btn .avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #ff8c00;
    transition: transform 0.2s ease;
}

.user-btn:hover .avatar {
    transform: scale(1.05);
}

/* Conteúdo do dropdown */
.dropdown-content {
    position: absolute;
    top: 45px;
    right: 0;
    background: #fff;
    border-radius: 8px;
    padding: 10px 0;
    width: 170px;
    display: none;

    box-shadow: 0px 4px 12px rgba(0,0,0,0.2);
    z-index: 9999;
}

.dropdown-content a {
    display: block;
    padding: 10px 14px;
    text-decoration: none;
    font-size: 15px;
    color: #333;
}

.dropdown-content a:hover {
    background: #f2f2f2;
}

/* Mostrar dropdown quando ativo */
.dropdown.active .dropdown-content {
    display: block;
}

/* Fechar ao clicar fora */
body.dropdown-open {
    pointer-events: auto;
}

.user-btn .arrow {
    display: inline-block;
    transition: transform 0.2s ease;
}

.dropdown.active .arrow {
    transform: rotate(180deg);
}

/* ---------------------------------------------
   IMAGENS PADRÃO DE SEÇÕES
---------------------------------------------*/
.section-img {
    max-width: 350px;
    width: 100%;
    border-radius: 10px;
    object-fit: cover;
}

@media (max-width: 768px) {
    .section-img {
        max-width: 250px;
        margin: 0 auto;
    }
}

#footer {
  background-color: #555;
  padding: 10px;
  width: 100%;
  text-align: center;
  color: #fff;
  font-size: 0.9rem;
min-height: 50px; 
    opacity: 0;
    transition: opacity 0.2s ease-in;
}

#footer.loaded {
    opacity: 1;
}
