/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;700&display=swap');

/* RESET */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* BASE */
body {
  font-family: 'Inter', sans-serif;
  line-height: 1.6;
  background: #f8fafc;
  color: #222;
  display: grid;
  grid-template-rows: 60px 1fr 60px;
  min-height: 100vh;
}

/* LOGO */
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.6rem;
  font-weight: bold;
  color: #fff;
}

.logo img {
  max-height: 60px;
  width: auto;
  object-fit: contain;
}

.logo span {
  color: #1a73e8;
  font-size: 1.4rem;
  font-weight: 700;
}

/* Opcional: estilização da nav */
nav {
  padding: 10px 20px;
  font-weight: bold;
}
/* HEADER */
header {
  height: 70px;
  background: #fff;
  color: #202122;
  border-bottom: 1px solid #a2a9b1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  font-weight: 700;
  font-size: 1.2rem;
  position: sticky;
  top: 0;
  z-index: 10;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}


header nav a {
  color: #36c;
  text-decoration: none;
  margin-left: 20px;
  font-weight: 500;
  transition: color 0.3s ease;
}

header nav a:hover,
header nav a:focus {
  color: #cce4ff;
  outline: none;
}

header form {
  margin-left: auto;
  display: flex;
  align-items: center;
}

header form input[type="search"] {
  padding: 6px 10px;
  border-radius: 4px 0 0 4px;
  border: 1px solid #ccc;
  outline: none;
  font-size: 1rem;
  min-width: 180px;
}

header form button {
  padding: 6px 12px;
  border: 1px solid #ccc;
  background: #f0f0f0;
  color: #333;
  font-weight: 600;
  border-radius: 0 4px 4px 0;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

header form button:hover,
header form button:focus {
  background: #ddd;
  outline: none;
}

.series-links {
  margin: 2rem 0;
}

.series-links ul {
  list-style: none;
  padding: 0;
}

.series-links li {
  margin: 0.5rem 0;
  
}

.series-links a {
  color: #0645ad;
  text-decoration: none;
}

/* MAIN LAYOUT */
main {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 20px;
  padding: 20px;
  padding-top: 80px;
  background: white;
  /* Espaço para a nav não ser encoberta */
  margin-top: 20px;

}

/* SIDEBAR */
aside {
  background: #e9ecef;
  color: #212529;
  border-radius: 8px;
  padding: 20px;
  font-size: 0.9rem;
  position: sticky;
  top: 80px;
  align-self: start;
}


aside nav ul {
  list-style: none;
}

aside nav ul li + li {
  margin-top: 12px;
}

aside nav ul li a {
  color: #0b3d91;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}

aside nav ul li a:hover,
aside nav ul li a:focus {
  color: #083d9b;
  outline: none;
}
aside nav ul li a.ativo {
  font-weight: bold;
  color: #0b54d6;
  text-decoration: underline;
}


/* ARTICLE */
article {
  max-width: 800px;
}

article header h1 {
  font-weight: 700;
  font-size: 2rem;
  margin-bottom: 12px;
  color: #0b3d91;
}

article header p.source {
  font-size: 0.85rem;
  color: #555;
  margin-bottom: 24px;
  font-style: italic;
}

article section {
  margin-bottom: 30px;
}

article section h2 {
  font-weight: 600;
  font-size: 1.4rem;
  margin-top: 20px;
  margin-bottom: 15px;
  border-bottom: 2px solid #1a73e8;
  padding-bottom: 4px;
  color: #1a73e8;
}

article section p {
  font-size: 1rem;
  color: #333;
  line-height: 1.5;
}

article section ul {
  margin-left: 20px;
  list-style-type: disc;
  color: #333;
}

article section ul li a {
  color: #1a73e8;
  text-decoration: none;
}

article section ul li a:hover,
article section ul li a:focus {
  text-decoration: underline;
  outline: none;
}

/* INTRO E IMAGEM */
.intro {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 30px;
}

.intro section {
  flex: 2;
}

.intro figure {
  flex: 1;
  margin: 10px 0;
  max-width: 300px;
  text-align: center;
}

.intro img {
  width: 100%;
  height: auto;
  border-radius: 8px;
}

.intro figcaption,
figcaption {
  font-size: 0.85rem;
  color: #555;
  margin-top: 8px;
  text-align: center;
}

/* IMAGEM FLUTUANTE */
.img-flutuante {
  float: right;
  margin: 20px 0 10px 20px;
  width: 200px;
  border-radius: 8px;
}

/* TABELA */
.Caption-titulo {
  font-weight: bold;
  font-size: 1.2rem;
  background-color: #0646add4;
  color: white;
  margin: 10px 0;
}
.caption {
  font-weight: bold;
  font-size: 10px;
  text-align: center;
  background-color: #0646add4;
  color: white;
  padding: 5px;
  margin: 5px 0;
}
.generos-lista {
  list-style-type: none;
  padding: 0;
  margin: 0;
}


/* INFOBOX */
.infobox-container {
  float: right;
  margin: 0 0 1em 1em;
  width: 260px;
  font-size: 0.9rem;
  background: #f9f9f9;
  border: 1px solid #aaa;
  padding: 10px;
  border-radius: 4px;
}

.infobox-img img {
  display: block;
  margin: 16px auto 10px;
}

.infobox {
  width: 100%;
  border-collapse: collapse;
}

.infobox th {
  text-align: left;
  padding: 4px;
  background: #e9e9e9;
}

.infobox td {
  padding: 4px;
  vertical-align: top;
}
.infobox-container h2 {
 
  text-align: center;
}

/* VISUALMENTE ESCONDIDO */
.sr-only {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* FOOTER */
.footer {
  background-color: #f8f9fa;
  color: #202122;
  padding: 20px 10px;
  text-align: center;
  font-size: 0.95rem;
  border-top: 1px solid #a2a9b1;
  box-shadow: 0 -2px 5px rgba(0,0,0,0.1);
}

.footer a {
  color: #3366cc;
  text-decoration: none;
}

.footer a:hover {
  text-decoration: underline;
}

.footer i {
  margin-right: 5px;
  color: #6c757d;
}


/* Estilo do balão customizado */
p a[data-tooltip] {
  position: relative;
  text-decoration: underline dotted;
  cursor: help;
}

p a[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%);
  background: #fff;
  color: #0645ad;
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid #ccc;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  font-size: 0.85rem;
  white-space: normal;
  max-width: 300px;
  min-width: 200px;
  word-break: break-word;
  text-align: left;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease;
  z-index: 999;
  pointer-events: none;
}

/* Triângulo */
p a[data-tooltip]::before {
  content: '';
  position: absolute;
  bottom: 115%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: #1a73e8;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease;
  z-index: 999;
}

/* Quando passar o mouse */
p a[data-tooltip]:hover::after,
p a[data-tooltip]:hover::before {
  opacity: 1;
  visibility: visible;
}
.tooltip-link {
  position: relative;
  text-decoration: none;
  color: #0645AD;
}

.tooltip-box {
  display: none;
  position: absolute;
  top: 1.5em;
  left: 0;
  z-index: 10;
  background-color: #ffffff;
  border: 1px solid #ccc;
  padding: 10px;
  width: 200px; 
  max-width: 90vw;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.tooltip-link:hover .tooltip-box {
  display: block;
}

/* Controla a imagem */
.tooltip-box img {
  max-width: 100%; 
  height: auto;
  display: block;
  margin-bottom: 8px;
}

/* Texto dentro do tooltip */
.tooltip-text {
  font-size: 0.875rem;
  color: #333;
}

/* Mostra o tooltip ao passar o mouse */
.tooltip-link:hover .tooltip-box {
  display: block;
}






/* RESPONSIVO */
@media (max-width: 768px) {
  main {
    grid-template-columns: 1fr;
    padding: 15px;
  }

  aside {
    order: 2;
    margin-top: 20px;
  }

  article {
    order: 1;
    max-width: 100%;
  }

  header {
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
  }

  header form input[type="search"] {
    min-width: 100px;
  }

  header nav {
    display: none;
  }

  .img-flutuante {
    float: none;
    display: block;
    margin: 0 auto 20px;
  }

  .sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }
}

@media (min-width: 1024px) {
  aside {
    position: sticky;
    top: 80px;
  }
}
