/* Normalização de Box Sizing */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Estilos básicos e reset */
:root {
  --primary-color: #e67e22;
  --secondary-color: #d35400;
  --light-gray: #f4f4f4;
  --gray: #ccc;
  --dark-gray: #333;
  --white: #fff;
  --shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

html,
body {
  overflow-x: hidden;
  width: 100%;
}

body {
  font-family: "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  margin: 0;
  background-color: var(--light-gray);
  color: var(--dark-gray);
}

.container {
  max-width: 800px;
  margin: auto;
  overflow: visible;
  padding: 0 20px;
}

/* Header e Navbar */
.navbar {
  background: var(--white);
  padding: 1rem 0;
  border-bottom: 1px solid #ddd;
  box-shadow: var(--shadow);
  position: relative;
}

.navbar .container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 0.25rem;
  overflow: visible;
}

.navbar .logo {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--primary-color);
  text-decoration: none;
}

/* Botão Hamburger */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1001;
}

.nav-toggle span {
  display: block;
  width: 25px;
  height: 3px;
  background: var(--dark-gray);
  margin: 5px 0;
  border-radius: 2px;
  transition: all 0.3s ease;
}

.nav-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -6px);
}

.nav-links {
  list-style: none;
  display: flex;
  margin: 0;
  padding: 0;
  flex-wrap: nowrap;
  gap: 0 0.6rem;
  justify-content: center;
}

.nav-links li a {
  color: var(--dark-gray);
  padding: 0.75rem 0.6rem;
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s, background 0.3s;
  font-size: 0.95rem;
  display: block;
}

.nav-links li a:hover {
  color: var(--primary-color);
}

.nav-links li a.active {
  color: var(--secondary-color);
  font-weight: 800;
}

/* Seção do Conversor */
.converter-section {
  padding: 2rem 0;
  text-align: center;
}

.converter-section h1 {
  margin-bottom: 0.5rem;
  color: var(--primary-color);
}

/* App do Conversor */
.converter-app {
  background: var(--white);
  padding: 2rem;
  border-radius: 8px;
  box-shadow: var(--shadow);
  margin-top: 2rem;
}

.cup-toggle {
  margin-bottom: 1.5rem;
}
.cup-toggle span {
  margin-right: 10px;
  font-weight: bold;
}
.cup-toggle button {
  padding: 8px 12px;
  border: 1px solid var(--gray);
  background: var(--light-gray);
  cursor: pointer;
  transition: background 0.3s;
}
.cup-toggle button.active {
  background: var(--primary-color);
  color: var(--white);
  border-color: var(--secondary-color);
}

.converter-form {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1.5rem;
  align-items: flex-end;
}

.form-group {
  display: flex;
  flex-direction: column;
  text-align: left;
  gap: 0.5rem;
}

.form-group label {
  font-weight: bold;
  margin-bottom: 0; /* Reset margin as gap is used now */
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--gray);
  border-radius: 4px;
  font-size: 1rem;
}

.form-group input[readonly] {
  background-color: #eee;
  font-weight: bold;
}

.converter-controls {
  margin-top: 1.5rem;
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.converter-controls button {
  padding: 10px 20px;
  border: none;
  background: var(--secondary-color);
  color: var(--white);
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.3s;
  font-size: 1rem;
}

.converter-controls button:hover {
  background: var(--primary-color);
}

.converter-controls button i {
  margin-right: 8px;
}

/* Placeholder de Anúncio */
.ad-container {
  width: min(100% - 40px, 970px);
  margin-left: auto;
  margin-right: auto;
  text-align: center;
  overflow: hidden;
}

.ad-container-top {
  margin-top: 1rem;
  margin-bottom: 1.25rem;
}

.home-top-ad {
  margin-bottom: 0.25rem;
}

.home-top-ad + .container .converter-section {
  padding-top: 0.5rem;
}

.ad-container-bottom {
  margin-top: 1.5rem;
  margin-bottom: 1rem;
}

.ad-container .adsbygoogle {
  margin: 0 auto;
}

.ad-container-top .adsbygoogle {
  max-width: 100%;
}

.ad-placeholder {
  background: #e9e9e9;
  border: 2px dashed var(--gray);
  margin: 2rem auto;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #999;
  max-width: 100%;
}
.ad-leaderboard {
  width: 728px;
  height: 90px;
}

.ad-bottom-banner {
  width: 300px;
  height: 250px;
}

/* Footer */
.footer {
  background: var(--dark-gray);
  color: var(--white);
  text-align: center;
  padding: 1rem 0;
  margin-top: 0;
}

.footer a {
  color: var(--white);
  text-decoration: underline;
}
.footer a:visited {
  color: var(--white);
}
.footer a:hover {
  color: #ffd9bd;
}

/* Responsividade */
@media (max-width: 900px) {
  /* Menu Hamburger Mobile */
  .nav-toggle {
    display: block;
  }

  .navbar .container {
    flex-direction: row;
    justify-content: center;
    position: relative;
    min-height: 44px;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    width: 100%;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    padding: 0;
    margin: 0;
    border-top: 1px solid #ddd;
  }

  .nav-links.active {
    display: flex;
  }

  .nav-links li {
    width: 100%;
    margin: 0;
    border-bottom: 1px solid #eee;
  }

  .nav-links li:last-child {
    border-bottom: none;
  }

  .nav-links li a {
    display: block;
    padding: 1rem 1.5rem;
    text-align: center;
    font-size: 1rem;
  }

  .nav-links li a:hover,
  .nav-links li a.active {
    background: var(--light-gray);
  }

  .converter-form {
    grid-template-columns: 1fr;
    row-gap: 1rem;
  }

  .ad-leaderboard {
    width: 100% !important;
    max-width: 300px !important;
    height: auto !important;
    min-height: 250px;
  }

  .ad-container-top {
    aspect-ratio: 728 / 90;
    height: auto;
    max-height: 90px;
  }

  .ad-container-top .adsbygoogle {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 728 / 90;
  }

  .info-cards {
    grid-template-columns: 1fr;
  }

  /* Breadcrumb centralizado */
  .breadcrumb {
    justify-content: center;
    text-align: center;
    padding: 0 15px;
  }
}

@media (max-width: 480px) {
  .converter-controls {
    flex-direction: column;
  }

  .container {
    padding: 0 15px;
  }

  .navbar .logo {
    font-size: 1.25rem;
  }
}
/* Breadcrumb */
.breadcrumb {
  font-size: 0.95rem;
  color: #666;
  margin: 1rem auto 0;
  padding: 0 20px;
  display: flex;
  gap: 0.35rem;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  text-align: center;
  max-width: 800px;
}
.breadcrumb a {
  color: var(--secondary-color);
  text-decoration: none;
}
.breadcrumb a:hover {
  text-decoration: underline;
}
.breadcrumb span {
  margin: 0 0.25rem;
}

@media (min-width: 901px) {
  .nav-links {
    gap: 0 0.6rem;
  }
  .breadcrumb {
    justify-content: center;
  }
  .navbar .container {
    gap: 2rem;
  }
}

/* Tabelas responsivas */
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 -20px;
  padding: 0 20px;
  width: calc(100% + 40px);
}
.table-responsive.wide {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.table {
  width: 100%;
  border-collapse: collapse;
}
.table.wide {
  min-width: 560px;
}
.table th,
.table td {
  padding: 10px 12px;
  border-bottom: 1px solid #eee;
  text-align: left;
  vertical-align: top;
  word-break: break-word;
  font-size: 0.95rem;
}

@media (max-width: 480px) {
  .table th,
  .table td {
    padding: 8px;
    font-size: 0.9rem;
  }

  .table-responsive {
    margin: 0 -15px;
    padding: 0 15px;
    width: calc(100% + 30px);
  }
}

.info-section {
  background: var(--white);
  border-radius: 8px;
  box-shadow: var(--shadow);
  margin: 1.5rem 0;
  padding: 2rem;
}

.info-cards {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 1.5rem;
}

.info-card {
  background: #fff8f1;
  border: 1px solid #f0d8c2;
  border-radius: 8px;
  padding: 1.25rem;
  text-align: center;
}

.info-card i {
  color: var(--primary-color);
  font-size: 1.6rem;
}

.info-card-link {
  color: inherit;
  display: block;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.info-card-link:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.not-found-section {
  text-align: center;
}
