@font-face {
  font-family: 'Armelie';
  src: url('../fonts/Armelie.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: 'Merriweather';
  src: url('../fonts/Merriweather.ttf') format('opentype');
  font-weight: normal;
  font-style: normal;
}
/* Faixa colorida do topo que cobre os botões */
.top-bg {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  position: relative;
  z-index: 1;
  padding-bottom: 0.5rem;
}

.top-bg .theme-nav {
  margin-bottom: 0;
}

.top-bg nav {
  background: none;
}
/* Didasteia — estilo básico */
:root {
  --bg: #f4f4f6;
  --text: #111;
  --muted: #4a4a55;
  --primary: #1e4d7b;
  --accent: #b45f06;
  --surface: #ffffff;
  --border: rgba(0, 0, 0, 0.08);
  --radius: 12px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Merriweather', Georgia, Cambria, "Times New Roman", Times, serif;
  color: var(--text);
  background: linear-gradient(180deg, #f4efe3 0%, #e6dfd2 100%);
  line-height: 1.5;
}

a {
  color: #6d1b17;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.container {
  width: min(1000px, 96%);
  margin: 0 auto;
}

.header {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  padding: 0.8rem 0 0.5rem;
}

.brand h1 {
  font-size: 1.9rem;
  font-family: 'Armelie', Georgia, Cambria, "Times New Roman", Times, serif;
}

.brand p {
  font-size: 0.75rem;
  font-family: 'Merriweather', Georgia, Cambria, "Times New Roman", Times, serif;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.6rem;
  padding: 0;
  list-style: none;
  justify-content: center;
  align-items: center;
  max-width: 700px;
  margin: 0 auto;
}

.header .container {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.theme-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}

.theme-nav {
  justify-content: center;
}

@media (max-width: 720px) {
  .header .container {
    align-items: flex-start;
  }

  .header-right {
    width: 100%;
  }
}

.header-right {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: flex-start;
  width: 100%;
  max-width: 500px;
  gap: 0.8rem;
}

.header-search {
  flex: 1 1 220px;
  min-width: 220px;
}

.header-search-input {
  width: 100%;
  padding: 0.55rem 0.85rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.9);
  color: #222;
  font-size: 0.95rem;
  font-family: 'Merriweather', Georgia, Cambria, "Times New Roman", Times, serif;
}

.theme-nav {
  margin-top: 0.5rem;
  justify-content: center;
  width: 100%;
}

.theme-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0;
  margin: 0 auto;
  list-style: none;
  justify-content: center;
  width: 100%;
}

.theme {
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 999px;
  padding: 0.45rem 0.85rem;
  color: #fff;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: bold;
  transition: background 0.15s ease, transform 0.15s ease;
  font-family: 'Merriweather', Georgia, Cambria, "Times New Roman", Times, serif;
}

.theme:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-1px);
}

.theme.active {
  background: rgba(255, 255, 255, 0.9);
  color: var(--primary);
}

.header-search-input:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.9);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.28);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.brand h1 {
  margin: 0;
  font-size: 2.25rem;
  letter-spacing: -0.03em;
}

.brand p {
  margin: 0.5rem 0 0;
  opacity: 0.85;
}

.tabs {
  /* ...existing code... */
}

.category-nav {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px dashed rgba(255, 255, 255, 0.5);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.category-label {
  font-size: 0.85rem;
  opacity: 0.7;
}

.category-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0;
  margin: 0;
  list-style: none;
}

.category {
  border: 1px solid rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  padding: 0.45rem 0.85rem;
  color: #fff;
  cursor: pointer;
  font-size: 0.85rem;
  transition: background 0.15s ease, transform 0.15s ease;
}

.category:hover {
  background: rgba(255, 255, 255, 0.28);
  transform: translateY(-1px);
}

.category.active {
  background: rgba(255, 255, 255, 0.9);
  color: var(--primary);
}

.search {
  margin-top: 1.8rem;
  padding: 1.4rem 1.1rem 1.2rem;
  background: rgba(255, 255, 255, 0.9);
  border-radius: var(--radius);
  border: 1px solid var(--border);  display: none;}

.add-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 1rem 0 0;
  padding: 0.65rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}

.add-btn:hover {
  background: rgba(255, 255, 255, 0.28);
  transform: translateY(-1px);
}

.modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  z-index: 1000;
}

.modal[hidden] {
  display: none;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
}

.modal-content {
  position: relative;
  width: min(600px, 100%);
  max-height: 90vh;
  overflow: auto;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.3);
  z-index: 1;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.modal-header h2 {
  margin: 0;
  font-size: 1.3rem;
}

.modal-close {
  border: none;
  background: none;
  font-size: 1.6rem;
  line-height: 1;
  color: rgba(0, 0, 0, 0.55);
  cursor: pointer;
}

.modal-form .form-row {
  display: grid;
  gap: 1rem;
  margin-bottom: 1rem;
}

.modal-form label {
  display: flex;
  flex-direction: column;
  font-size: 0.85rem;
  color: rgba(0, 0, 0, 0.75);
}

.modal-form input,
.modal-form select,
.modal-form textarea {
  margin-top: 0.35rem;
  padding: 0.55rem 0.7rem;
  font-size: 0.95rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  outline: none;
  background: rgba(255, 255, 255, 0.95);
}

.modal-form textarea {
  resize: vertical;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.btn {
  padding: 0.6rem 1.1rem;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: rgba(255, 255, 255, 0.85);
  cursor: pointer;
  font-weight: 600;
  transition: transform 0.15s ease, background 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn.primary {
  background: var(--primary);
  border-color: rgba(255, 255, 255, 0.5);
  color: #fff;
}

@media (max-width: 680px) {
  .modal-form .form-row {
    grid-template-columns: 1fr;
  }
}

.search-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: flex-end;
}

.search-label {
  display: flex;
  flex-direction: column;
  font-size: 0.85rem;
  color: rgba(0, 0, 0, 0.65);
  min-width: 170px;
}

.search-input,
.search-select {
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.55rem 0.75rem;
  font-size: 0.95rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  outline: none;
  background: rgba(255, 255, 255, 0.95);
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.search-input:focus,
.search-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(30, 77, 123, 0.18);
}

@media (max-width: 680px) {
  .search-row {
    flex-direction: column;
    align-items: stretch;
  }
}

.tab {
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  color: #fff;
  padding: 0.45rem 0.85rem;
  cursor: pointer;
  font-weight: 600;
  transition: transform 0.15s ease, background 0.15s ease;
  font-family: 'Merriweather', Georgia, Cambria, "Times New Roman", Times, serif;
}

.tab:hover {
  transform: translateY(-1px);
  font-family: 'Merriweather', Georgia, Cambria, "Times New Roman", Times, serif;
}

.tab.active {
  background: rgba(255, 255, 255, 0.95);
  color: var(--primary);
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.18);
  font-family: 'Merriweather', Georgia, Cambria, "Times New Roman", Times, serif;
}

main {
  padding: 2.5rem 0 3rem;
}

.content {
  background: rgba(255, 255, 250, 0.95);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.12);
}

.content h2 {
  margin-top: 0;
  font-family: Garamond, Georgia, serif;
  letter-spacing: -0.02em;
}

.text-list {
  list-style: none;
  padding: 0;
  margin: 1.25rem 0 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}

.text-list li {
  padding: 0.75rem 0.9rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.07);
}

.text-list li:last-child {
  border-bottom: none;
}

.text-list time {
  display: block;
  font-size: 0.85rem;
  opacity: 0.7;
  margin-bottom: 0.35rem;
}

.text-list a {
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary);
}

.text-list a:hover {
  color: var(--accent);
}

.text-list small {
  display: block;
  font-size: 0.84rem;
  opacity: 0.7;
  margin-top: 0.25rem;
}

.content p {
  margin: 0.9rem 0;
}

.content ul {
  padding-left: 1.25rem;
  margin: 1rem 0;
}

.content a {
  color: var(--primary);
  text-decoration: underline;
}

.content a:hover {
  text-decoration: none;
}

.footer {
  border-top: 1px solid var(--border);
  padding: 1.4rem 0 2rem;
  font-size: 0.92rem;
  color: var(--muted);
}

@media (max-width: 680px) {
  .tabs {
    justify-content: center;
  }

  .content {
    padding: 1.25rem;
  }
}
