:root {
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.12);
  --shadow-xl: 0 20px 48px rgba(0, 0, 0, 0.16);
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);

  /* Cores por tipo de arquivo */
  --pdf-color: #d33b3b;
  --pdf-bg: #fbe9e9;
  --excel-color: #1c8a52;
  --excel-bg: #e4f5ec;
  --word-color: #2657c9;
  --word-bg: #e6ecfc;
  --ppt-color: #d3701f;
  --ppt-bg: #fbecdd;
  --zip-color: #7a6a53;
  --zip-bg: #efeae2;
}

/* ============================= */
/* Cabeçalho */
/* ============================= */

.page-header {
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 2px solid var(--gold-soft);
}

.page-eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--red-main);
  margin-bottom: 8px;
}

.page-title {
  font-size: 30px;
  font-weight: 700;
  color: var(--black-soft);
  margin: 0;
}

/* ============================= */
/* Abas por raça */
/* ============================= */

.menus-especie-selector {
  display: flex;
  justify-content: center;
  margin-bottom: 32px;
}

.especie-tabs {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

.especie-option {
  background: transparent;
  border: 2px solid var(--red-main);
  color: var(--red-main);
  font-weight: 600;
  padding: 10px 28px;
  border-radius: 50px;
  text-decoration: none;
  transition: all 0.25s ease;
}

.especie-option:hover {
  background: var(--red-dark);
  border-color: var(--red-dark);
  color: var(--white);
}

.especie-option.active {
  background: var(--red-main);
  color: var(--white);
}

/* ============================= */
/* Títulos */
/* ============================= */

.page-heading {
  font-size: 28px;
  font-weight: 700;
  margin: 40px 0 20px;
  color: var(--black-soft);
  position: relative;
}

.page-heading::after {
  content: "";
  width: 50px;
  height: 3px;
  background: var(--red-main);
  position: absolute;
  bottom: -8px;
  left: 0;
  border-radius: 3px;
}

/* ============================= */
/* Texto */
/* ============================= */

.page-paragraph {
  font-size: 17px;
  line-height: 1.8;
  color: var(--text-main);
  margin-top: 40px;
  margin-bottom: 12px;
  text-align: justify;
}

.page-paragraph p {
  margin-bottom: 0;
}

.page-paragraph strong,
.page-paragraph b {
  color: var(--black-main);
  font-weight: 700;
}

.page-paragraph a {
  color: var(--red-main);
  font-weight: 600;
  text-decoration: none;
  position: relative;
  transition: var(--transition-smooth);
  border-bottom: 2px solid transparent;
}

.page-paragraph a:hover {
  color: var(--red-dark);
  border-bottom-color: var(--red-main);
  padding-bottom: 2px;
}

.page-paragraph ul,
.page-paragraph ol {
  margin-left: 20px;
  margin-bottom: 1.4em;
}

.page-paragraph li {
  margin-bottom: 0.6em;
  padding-left: 8px;
}

.page-paragraph h2 {
  font-size: 28px;
}

.page-paragraph h2::after {
  content: "";
  width: 50px;
  height: 3px;
  background: var(--red-main);
  border-radius: 3px;
  display: block;
  margin-top: 5px;
}

.block-heading,
.block-paragraph,
.block-timeline {
  grid-column: 1 / -1;
}

/* ============================= */
/* Seção de documentos agrupados */
/* ============================= */

.document-section {
  grid-column: 1 / -1;
  background: var(--white);
  border: 1px solid var(--border-light);
  border-radius: 16px;
  padding: 24px;
}

.document-section-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}

.document-section-icon {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  font-size: 18px;
  background: var(--red-soft);
  color: var(--red-main);
}

.document-section-info {
  flex: 1;
  min-width: 0;
}

.document-section-title {
  margin: 0;
  font-size: 19px;
  font-weight: 700;
  color: var(--black-soft);
}

.document-section-count {
  font-size: 13px;
  color: var(--text-muted);
}

.document-section-download {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--red-main);
  text-decoration: none;
  white-space: nowrap;
}

.document-section-download:hover {
  color: var(--red-dark);
  text-decoration: underline;
}

.document-section-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 18px;
}

@media (max-width: 600px) {
  .document-section-header {
    flex-wrap: wrap;
  }

  .document-section-grid {
    grid-template-columns: 1fr;
  }
}

.ano-filtro {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  margin: 32px 0;
}

.ano-filtro-label {
  font-weight: 600;
  color: var(--black-soft);
  white-space: nowrap;
}

.ano-filtro-btn {
  background: var(--white);
  border: 2px solid var(--red-main);
  border-radius: 50px;
  color: var(--red-main);
  font-weight: 600;
  min-width: 100px;
  padding: 8px;
  transition: var(--transition-smooth);
}

.ano-filtro-btn:hover,
.ano-filtro-btn.show {
  background: var(--red-dark);
  border-color: var(--red-dark);
  color: var(--white);
}

.ano-filtro-menu {
  border: none;
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  min-width: 120px;
  padding: 8px;
}

.ano-filtro-menu .dropdown-item {
  border-radius: 8px;
  font-weight: 600;
  padding: 8px 16px;
  transition: var(--transition-smooth);
}

.ano-filtro-menu .dropdown-item:hover {
  background: var(--red-soft);
  color: var(--black-soft);
}

.ano-filtro-menu .dropdown-item.active {
  background: var(--red-main);
  color: var(--white);
}

/* ============================= */
/* Documentos */
/* ============================= */

.document-card {
  background: var(--white);
  border: 2px solid var(--border-light);
  border-radius: 12px;
  height: 100%;
  padding: 18px;
  transition: var(--transition-smooth);
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.page-body {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  align-items: stretch;
}

.block-paragraph {
  margin-bottom: -12px;
}

.document-card:hover {
  box-shadow: var(--shadow-lg);
  border-color: var(--red-main);
}

.document-icon {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  font-size: 19px;
  background: var(--red-soft);
  color: var(--red-main);
}

.doc-ext-pdf .document-icon {
  background: var(--pdf-bg);
  color: var(--pdf-color);
}

.doc-ext-xls .document-icon,
.doc-ext-xlsx .document-icon,
.doc-ext-csv .document-icon {
  background: var(--excel-bg);
  color: var(--excel-color);
}

.doc-ext-doc .document-icon,
.doc-ext-docx .document-icon {
  background: var(--word-bg);
  color: var(--word-color);
}

.doc-ext-ppt .document-icon,
.doc-ext-pptx .document-icon {
  background: var(--ppt-bg);
  color: var(--ppt-color);
}

.doc-ext-zip .document-icon,
.doc-ext-rar .document-icon {
  background: var(--zip-bg);
  color: var(--zip-color);
}

.document-card p {
  margin: 8px 0 0;
  padding-right: 36px;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--black-soft);
  word-break: break-word;
}

.document-info {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

.document-ext {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.download-btn {
  position: absolute;
  top: 18px;
  right: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--red-soft);
  color: var(--red-main);
  transition: var(--transition-smooth);
}

.document-card:hover .download-btn {
  background: var(--red-main);
  color: var(--white);
}

.doc-ext-pdf .download-btn {
  background: var(--pdf-bg);
  color: var(--pdf-color);
}

.doc-ext-pdf:hover .download-btn {
  background: var(--pdf-color);
  color: var(--white);
}

.doc-ext-xls .download-btn,
.doc-ext-xlsx .download-btn,
.doc-ext-csv .download-btn {
  background: var(--excel-bg);
  color: var(--excel-color);
}

.doc-ext-xls:hover .download-btn,
.doc-ext-xlsx:hover .download-btn,
.doc-ext-csv:hover .download-btn {
  background: var(--excel-color);
  color: var(--white);
}

.doc-ext-doc .download-btn,
.doc-ext-docx .download-btn {
  background: var(--word-bg);
  color: var(--word-color);
}

.doc-ext-doc:hover .download-btn,
.doc-ext-docx:hover .download-btn {
  background: var(--word-color);
  color: var(--white);
}

.doc-ext-ppt .download-btn,
.doc-ext-pptx .download-btn {
  background: var(--ppt-bg);
  color: var(--ppt-color);
}

.doc-ext-ppt:hover .download-btn,
.doc-ext-pptx:hover .download-btn {
  background: var(--ppt-color);
  color: var(--white);
}

.doc-ext-zip .download-btn,
.doc-ext-rar .download-btn {
  background: var(--zip-bg);
  color: var(--zip-color);
}

.doc-ext-zip:hover .download-btn,
.doc-ext-rar:hover .download-btn {
  background: var(--zip-color);
  color: var(--white);
}

@media (max-width: 600px) {
  .page-body {
    grid-template-columns: 1fr;
  }
}

/* ============================= */
/* IMAGEM COM TEXTO */
/* ============================= */
.grid-texto-imagem {
  display: contents;
}

.grid-item {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.grid-image {
  margin-top: auto;
}

.grid-image img {
  width: 100%;
  max-width: 300px;
  height: auto;
  display: block;
  margin: 0 auto;
  border-radius: 8px;
}

.grid-text {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 4.5em;
  text-align: center;
}

.grid-text a {
  color: var(--red-main);
  font-weight: 600;
  text-decoration: none;
  position: relative;
  transition: var(--transition-smooth);
  border-bottom: 2px solid transparent;
}

.grid-text a:hover {
  color: var(--red-dark);
  text-decoration: underline;
}


.timeline {
  position: relative;
  padding: 40px 0;
  width: 100%;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--red-main);
  transform: translateX(-50%);
  border-radius: 4px;
  z-index: 0;
}

.timeline-item {
  display: grid;
  grid-template-columns: 1fr 60px 1fr;
  grid-template-areas: "label center card";
  align-items: start;
  margin-bottom: 60px;
  position: relative;
}

.timeline-item:nth-child(even) {
  grid-template-areas: "card center label";
}

.timeline-label-side {
  grid-area: label;
  text-align: right;
  padding-right: 32px;
  padding-top: 16px;
}

.timeline-item:nth-child(even) .timeline-label-side {
  text-align: left;
  padding-right: 0;
  padding-left: 32px;
}

.timeline-center {
  grid-area: center;
  display: flex;
  justify-content: center;
  padding-top: 20px;
  position: relative;
  z-index: 1;
}

.timeline-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--red-main);
  border: 4px solid #fff;
  box-shadow: 0 0 0 3px var(--red-main);
  flex-shrink: 0;
}

.timeline-card-side {
  grid-area: card;
  padding-left: 32px;
}

.timeline-item:nth-child(even) .timeline-card-side {
  display: flex;
  justify-content: end;
  padding-left: 0;
  padding-right: 32px;
}

.timeline-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--black-main);
  margin: 0 0 6px;
}

.timeline-date {
  display: block;
  font-size: 18px;
  color: var(--red-main);
  font-weight: 500;
}

.timeline-card {
  background: #fff;
  max-width: 390px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.07);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.timeline-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl);
  border-color: var(--red-main);
}

.timeline-image {
  display: flex;
  justify-content: center;
}

.timeline-image img {
  height: 355px;
  aspect-ratio: 5 / 4;
  object-fit: contain;
}

.timeline-content {
  padding: 18px 20px;
  line-height: 1.7;
  color: var(--text-main);
  margin-bottom: 0;
  font-size: 20px;
  background: var(--white);
}

.timeline-content p {
  margin-bottom: 0;
}

.timeline-content strong {
  color: var(--black-main);
  font-weight: 700;
}

@media (max-width: 768px) {
  .timeline::before {
    left: 24px;
    transform: none;
  }

  .timeline-item,
  .timeline-item:nth-child(even) {
    grid-template-columns: 48px 1fr;
    grid-template-areas:
      "center label"
      "center card";
    margin-bottom: 40px;
  }

  .timeline-label-side,
  .timeline-item:nth-child(even) .timeline-label-side {
    grid-area: label;
    text-align: left;
    padding: 0 0 10px 16px;
  }

  .timeline-center {
    grid-area: center;
    grid-row: 1 / 3;
    justify-content: center;
    padding-top: 12px;
  }

  .timeline-card-side,
  .timeline-item:nth-child(even) .timeline-card-side {
    grid-area: card;
    justify-content: start;
    padding: 0 0 0 16px;
  }
}
