@charset "utf-8";
* body { box-sizing: border-box;
}
img {
    max-width: 100%;
}

/*tipogradfia para todoss*/
body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
  color: #324839;
  background-color: #fff8dc;
  margin: 0;
  padding: 0;

  display: grid;
  grid-template-rows: 1fr auto; /* contenido flexible + header en la fila inferior */
  grid-template-columns: 1fr;
  min-height: 100vh;
}

#logo img {
  display: none;
  padding: none;
  max-width: 20%;
    height: auto;
    margin: 0;
    padding-bottom: 20px;
    padding-top: 20px;
}

header {
  align-items: center;
  justify-content: space-between;
  padding: 10px 15px;
}

/* Asegura que el header ocupe la fila inferior y quede por encima del contenido */
header {
  grid-row: 2 / 3;
  grid-column: 1 / -1;
  position: sticky;
  bottom: 0;
  z-index: 9999; /* capa superior */
  background: var(--header-bg,#eba148); /* evita transparencias al superponerse */
}

/* Ajustes menores para que nav ocupe todo el ancho dentro del header */
header nav {
  width: 100%;
  display: flex;
  justify-content: center; /* o space-between */
  align-items: center;
  gap: 30px;
}

header nav ul {
  display: flex;
  gap: 18px;
  padding: 0;
  margin: 0;
  list-style: none;
  justify-content: flex-start;
}

/* Ensure each nav item is a positioning context for its dropdown */
header nav ul {
  position: relative;
}

header nav ul li a {
  text-decoration: none;
  font-size: small;
  font-weight: medium;
  color: #ffffff;
  padding: 8px 10px;
  border-radius: 8px;
  transition: background-color 0.3s;
  display: grid;
  justify-items: center;
  gap: 5px;
}

header nav ul a img {
    width: 24px;
    height: 24px;
}

header nav ul a:hover,
header nav ul a:focus {
font-weight: bold;
background-color: #324839;
border-radius: 50%;
}

/* Main stacking context: keep main under dropdowns */
main {
  position: relative;
  z-index: 1;
}

/* Menu toggle button (small caret) */
.menu-toggle {
  background: transparent;
  border: none;
  color: #ffffff;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  padding: 6px 8px;
  display: inline-flex;
  align-items: center;
}

/* Dropdown - appears above the header (bottom: 100%) and below the header in z-order */
.dropdown-menu {
  position: absolute;
  bottom: 100%; /* place above the header */
  left: 0;
  min-width: 140px;
  background: #ffffff;
  color: #324839;
  border-radius: 8px;
  box-shadow: 0 -6px 18px rgba(0,0,0,0.12);
  transform-origin: bottom center;
  transform: translateY(10px) scale(0.98);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.18s ease, opacity 0.18s ease;
  z-index: 5000; /* below header (9999) but above main (1) */
}

.dropdown-menu.open {
  transform: translateY(0) scale(1);
  opacity: 1;
  pointer-events: auto;
}

.dropdown-menu ul {
  list-style: none;
  margin: 0;
  padding: 0.4rem 0;
}

.dropdown-menu li a {
  display: block;
  padding: 8px 12px;
  color: inherit;
  text-decoration: none;
  font-size: 0.95rem;
}

.dropdown-menu li a:hover,
.dropdown-menu li a:focus {
  background: #f3f3f3;
}


section {
  margin: 40px 20px;
  padding: 20px;
}

h1,
h2,
h3,
h4 {
  margin-top: 20px;
  margin-bottom: 15px;
}

p {
  margin: 10px 0;
  line-height: 1.6;
  max-width: 65ch;
}

.iniciarsesion {
    margin-bottom: 2rem;
    width: 50%;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: none;
    background: #eee;
    padding: 2rem 1rem;
}

.iniciarsesion {
    position: relative;
    z-index: 1;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
}

input:enabled {
  border: solid 1px blue;
  color: blue;
  box-shadow: 2px 2px 1px rgba(0, 0, 0, 0.5);
}

.form-publicacion {
    display: flex
;
    flex-direction: column;
    gap: 1rem;
}