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

:root {
  --layout-gutter: clamp(16px, 4vw, 72px);
  --content-max-width: 860px;
}

body {
  font-family: 'Roboto', sans-serif;
  background: #ffffff;
  min-height: 100vh;
  overflow-x: hidden;
}

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 90px;
  background: linear-gradient(to bottom, #000000 0%, #3A024E 80%);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  padding: 0 clamp(16px, 5vw, 80px);
  z-index: 1000;
}

.navbar-logo {
  display: flex;
  align-items: center;
  gap: 15px;
  text-decoration: none;
}

.navbar-logo img {
  width: 85px;
  height: 70px;
}

.navbar-logo span {
  font-size: 28px;
  font-weight: 700;
  color: #fff;
}

.breadcrumb {
  position: fixed;
  top: 100px;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 995;
  display: flex;
  justify-content: flex-start;
  padding: 8px 0;
  padding-left: clamp(16px, 5vw, 80px);
  background: linear-gradient(to bottom, #6b2fb3 0%, #5E097E 100%);
  box-shadow: 0 6px 18px rgba(10, 6, 20, 0.05);
}

.breadcrumb .crumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  padding: 0 clamp(8px, 2vw, 24px);
  font-weight: 600;
  color: #fff;
}

.breadcrumb .sep {
  color: rgba(255, 255, 255, 0.55);
  margin: 0 6px;
}

.breadcrumb a.item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #F1E7FF;
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 8px;
  transition: background .18s ease, transform .12s ease;
}

.breadcrumb a.item:hover {
  background: rgba(152, 100, 212, 0.3);
  color: #fff;
  transform: translateY(-2px);
}

.section {
  margin-top: 180px;
  padding: 0 var(--layout-gutter) 44px;
  max-width: var(--content-max-width);
  width: min(var(--content-max-width), calc(100vw - (var(--layout-gutter) * 2)));
  margin-left: auto;
  margin-right: auto;
}

.hero-section {
  position: relative;
  right: 0;
  color: #5E097E;
  text-align: left;
  margin-top: 170px;
  margin-left: -150px;
  margin-bottom: 40px;
}

.hero-section h1 {
  font-size: clamp(2rem, 3.4vw, 3.1rem);
  margin: 0 0 20px;
  font-weight: 700;
  color: #5E097E;
  line-height: 1.12;
}

.def-container-desktop {
  width: 100%;
  position: relative;
  margin-bottom: 30px;
}

.def-container-desktop h2 {
  position: absolute;
  top: -15px;
  left: 25px;
  background: #fff;
  border-radius: 10px;
  padding: 5px 15px;
  font-size: 24px;
  color: #5E097E;
  font-weight: 600;
}

.def-container-desktop > img {
  position: absolute;
  top: -40px;
  right: 25px;
  border: #fff 5px solid;
  height: 90px;
  width: 95px;
  box-shadow: 0 0 0 10px #fff inset;
  background-color: #fff;
}

.explicacao {
  width: 100%;
  border: 3px solid #302E96;
  border-radius: 10px;
  padding: 24px 20px;
  text-align: left;
  box-shadow: 0 3px 7px rgba(15, 8, 134, 0.4);
  background-color: #fff;
  font-size: clamp(1rem, 1.15vw, 1.08rem);
  color: #333;
  line-height: 1.65;
}

.explicacao strong {
  color: #5E097E;
  font-weight: 700;
}

.explicacao .label-colon {
  color: #5E097E;
  font-weight: 600;
}

.explicacao .formula {
  display: block;
  text-align: center;
  font-size: 22px;
  font-weight: 600;
  color: #302E96;
  margin: 10px 0 12px;
  padding: 12px;
  background-color: #f5f5f5;
  border-radius: 8px;
  border-left: 4px solid #5E097E;
}

.explicacao p {
  margin: 6px 0 10px;
}

.frac {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.1;
}

.frac .top {
  border-bottom: 1px solid currentColor;
  padding: 0 4px 2px;
}

.frac .bottom {
  padding: 2px 4px 0;
}

.direita {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 10px;
}

.info-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.info-btn img {
  width: 36px;
  height: 36px;
}

.calculo-desktop {
  width: 100%;
  margin-bottom: 30px;
}

.titulo-calculo-desktop {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: #5E097E;
  margin: 0 0 20px;
  font-size: clamp(1.15rem, 2vw, 1.5rem);
  font-weight: 700;
}

.titulo-calculo-desktop::before,
.titulo-calculo-desktop::after {
  content: "";
  flex: 1;
  border-top: 1.8px solid rgba(63, 58, 65, 0.8);
}

.dropdown-container-desktop {
  display: flex;
  justify-content: flex-end;
  margin-top: 16px;
  margin-bottom: 24px;
}

.dropdown-desktop {
  position: relative;
  user-select: none;
}

.dropdown-button-desktop {
  background: #f9f9f9;
  border: 3px solid #19178A;
  border-radius: 10px;
  padding: 12px 20px;
  font-weight: 700;
  color: #5E097E;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 18px;
  white-space: nowrap;
}

.arrow-desktop {
  font-size: 12px;
  transition: transform 0.3s;
}

.dropdown-button-desktop.active .arrow-desktop {
  transform: rotate(180deg);
}

.dropdown-content-desktop {
  position: absolute;
  top: 100%;
  right: 0;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  max-height: 0;
  overflow: hidden;
  z-index: 20;
  transition: max-height 0.3s ease;
  margin-top: 5px;
  min-width: 270px;
}

.dropdown-content-desktop.show {
  max-height: 360px;
  overflow-y: auto;
  border: 3px solid #19178A;
}

.dropdown-content-desktop button {
  width: 100%;
  padding: 13px 14px;
  background: none;
  border: none;
  text-align: left;
  color: #5E097E;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
}

.dropdown-content-desktop button:hover {
  background: #f0ecf7;
}

.input-header-desktop h6 {
  text-align: left;
  color: #111;
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 10px;
}

.value-summary {
  margin: 6px 0 12px;
  color: #5E097E;
  font-weight: 600;
  font-size: 14px;
  display: none;
}

.input-label {
  display: block;
  margin: 10px 0 6px;
  font-size: 16px;
  font-weight: 700;
  color: #5E097E;
}

.calculo-form-desktop {
  display: none;
}

.calculo-form-desktop.active {
  display: block;
}

.calculo-form-desktop input[type="number"] {
  width: 100%;
  padding: 14px;
  font-size: 17px;
  border: 1px solid #ccc;
  border-radius: 8px;
  margin-bottom: 14px;
  background: #fff;
}

/* Remove as setinhas dos inputs numéricos */
.calculo-form-desktop input[type="number"]::-webkit-outer-spin-button,
.calculo-form-desktop input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.calculo-form-desktop input[type="number"] {
  appearance: textfield;
  -moz-appearance: textfield;
}

.input-unit-row {
  display: grid;
  grid-template-columns: 1fr 106px;
  gap: 8px;
  align-items: stretch;
  margin-bottom: 14px;
}

.input-unit-row input[type="number"] {
  margin-bottom: 0;
}

.unit-select {
  width: 100%;
  min-width: 0;
  padding: 14px 10px;
  font-size: 17px;
  line-height: 1.2;
  min-height: 52px;
  box-sizing: border-box;
  border: 1px solid #ccc;
  border-radius: 8px;
  background: #fff;
  color: #5E097E;
  font-weight: 400;
}

.unit-select option {
  font-weight: 400;
}

.output-unit-row {
  display: block;
  margin: 0;
}

.output-unit-label {
  display: block;
  color: #5E097E;
  font-size: 16px;
  font-weight: 700;
  margin: 30px 0 6px;
}

.output-unit-row .unit-select {
  width: 100%;
  margin-bottom: 14px;
}

.unit-select:focus {
  border-color: #5E097E;
  box-shadow: 0 0 5px #5E097E;
  outline: none;
}

.unit-select:active {
  border-color: #5E097E;
  box-shadow: 0 0 5px #5E097E;
}

.calculo-form-desktop input[type="number"]:focus {
  border-color: #5E097E;
  box-shadow: 0 0 5px #5E097E;
  outline: none;
}

.calc-btn {
  width: 100%;
  padding: 14px;
  font-size: 17px;
  font-weight: 700;
  background-color: #5E097E;
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
}

.calc-btn:hover {
  background-color: #9036e4;
}

#resultado-desktop {
  margin-top: 30px;
  border: 3px solid #19178A;
  box-shadow: 0 3px 7px rgba(15, 8, 134, 0.4);
  border-radius: 10px;
  padding: 22px;
  text-align: center;
  background-color: #fff;
  display: none;
}

#resultado-desktop h2 {
  color: #5E097E;
  font-weight: 700;
  font-size: 22px;
  margin-bottom: 12px;
}

#resultado-desktop h3 {
  color: #5E097E;
  margin-top: 14px;
  font-weight: 700;
  font-size: 20px;
}

#resultado-desktop p {
  color: #333;
  font-size: 16px;
  line-height: 1.6;
  margin: 8px 0;
}

#resultado-desktop .conversion-step-initial {
  margin-bottom: 0;
}

#resultado-desktop .conversion-step-initial + p:not(.conversion-step-initial) {
  margin-top: 24px;
}

#resultado-desktop .conversion-step-final {
  margin-top: 24px;
}

#resultado-desktop .conversion-constant {
  color: #000;
  font-weight: 700;
}

#passoAPassoDesktop {
  margin: 0.5rem auto 0;
  max-width: 820px;
  text-align: left;
  white-space: normal;
}

#mensagemResultadoDesktop {
  display: block;
  margin: 0 auto;
  text-align: center;
}

.footer-desktop {
  background: linear-gradient(to bottom, #1a0025 0%, #2d0042 100%);
  color: white;
  padding: 44px clamp(16px, 5vw, 60px) 26px;
  margin-top: 56px;
}

.footer-content {
  max-width: 1400px;
  margin: 0 auto;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 14px;
}

.footer-logo img {
  width: 70px;
  height: 60px;
}

.footer-logo span {
  font-size: 26px;
  font-weight: bold;
  color: #00aeff;
}

.footer-brand p {
  color: #c8b3d4;
  font-size: 15px;
  line-height: 1.6;
  margin: 0;
  max-width: 560px;
}

.footer-bottom {
  max-width: 1400px;
  margin: 26px auto 0;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  text-align: center;
}

.footer-bottom p {
  color: #c8b3d4;
  font-size: 14px;
  margin: 0;
}

/* ================================================
   MOBILE
   ================================================ */
@media (max-width: 480px) {
  .navbar {
    height: 70px;
    padding: 0 16px;
  }

  .navbar-logo {
    gap: 8px;
  }

  .navbar-logo img {
    width: 55px;
    height: 50px;
  }

  .navbar-logo span {
    font-size: 18px;
  }

  .breadcrumb {
    top: 80px;
    padding-left: 16px;
  }

  .breadcrumb .crumbs {
    font-size: 10px;
    gap: 1px;
    padding: 0 4px;
    overflow-x: auto;
  }

  .section {
    margin-top: 132px;
    padding: 0 14px 24px;
    margin-left: 0;
    margin-right: 0;
    width: 100%;
    max-width: none;
  }

  .hero-section {
    margin-bottom: 18px;
    margin-top: 20px;
    margin-left: 0px;
    margin-bottom: 20px;
  }

  .hero-section h1 {
    font-size: 24px;
  }



  .def-container-desktop h2 {
    left: 14px;
    font-size: 18px;
    padding: 4px 10px;
  }

  .def-container-desktop > img {
    right: 12px;
    top: -24px;
    height: 56px;
    width: 60px;
    border-width: 4px;
  }

  .explicacao {
    padding: 18px 12px;
    font-size: 14px;
  }

  .explicacao .formula {
    font-size: 18px;
    padding: 10px;
  }

  .info-btn img {
    width: 26px;
    height: 26px;
  }

  .titulo-calculo-desktop {
    font-size: 18px;
    margin-bottom: 14px;
  }

  .dropdown-container-desktop {
    margin-top: 14px;
    margin-bottom: 20px;
  }

  .dropdown-button-desktop {
    font-size: 14px;
    padding: 8px 12px;
  }

  .dropdown-content-desktop {
    min-width: 200px;
  }

  .dropdown-content-desktop button {
    font-size: 13px;
    padding: 10px 12px;
  }

  .input-header-desktop h6 {
    font-size: 14px;
  }

  .input-label {
    font-size: 12px;
    margin: 8px 0 5px;
  }

  .calculo-form-desktop input[type="number"] {
    padding: 12px;
    font-size: 15px;
    margin-bottom: 12px;
    height: 46px;
  }

  .unit-select {
    padding: 0 8px;
    font-size: 15px;
    height: 46px;
    min-height: 46px;
    line-height: 46px;
  }

  .input-unit-row {
    grid-template-columns: 1fr 94px;
  }

  .output-unit-label {
    font-size: 13px;
    margin: 0;
  }

  .calc-btn {
    padding: 12px;
    font-size: 15px;
  }

  #resultado-desktop {
    margin-top: 20px;
    padding: 14px;
  }

  #resultado-desktop h2 {
    font-size: 18px;
  }

  #resultado-desktop h3 {
    font-size: 16px;
  }

  #resultado-desktop p {
    font-size: 14px;
  }

  .footer-desktop {
    margin-top: 40px;
    padding: 34px 16px 22px;
  }

  .footer-logo img {
    width: 58px;
    height: 50px;
  }

  .footer-logo span {
    font-size: 21px;
  }

  .footer-brand p,
  .footer-bottom p {
    font-size: 13px;
  }
}

/* ================================================
   MINI TABLETS (RETRATO)
   ================================================ */
@media (min-width: 481px) and (max-width: 900px) and (orientation: portrait) {
  :root {
    --layout-gutter: clamp(10px, 2.2vw, 20px);
    --content-max-width: 980px;
  }

  .section {
    width: min(var(--content-max-width), calc(100vw - (var(--layout-gutter) * 2)));
  }

  .hero-section {
    margin-bottom: 22px;
     margin-top: 20px;
    margin-left: 0px;
    margin-bottom: 20px;
  }

  .dropdown-container-desktop {
    margin-top: 15px;
    margin-bottom: 21px;
  }

  .footer-desktop {
    padding-left: 28px;
    padding-right: 28px;
  }
}

/* ================================================
   TABLETS MAIORES
   ================================================ */
@media (min-width: 901px) and (max-width: 1200px) {
  :root {
    --layout-gutter: clamp(10px, 1.8vw, 22px);
    --content-max-width: 980px;
  }

  .section {
    width: min(var(--content-max-width), calc(100vw - (var(--layout-gutter) * 2)));
  }

  .hero-section{
    margin-top: 30px;
    margin-left: 0px;
    margin-bottom: 30px;
  }

  .hero-section h1 {
    font-size: clamp(2.2rem, 3.1vw, 3.25rem);
  }

  .explicacao {
    font-size: 1.08rem;
  }

  .titulo-calculo-desktop {
    font-size: 1.6rem;
  }

  .dropdown-container-desktop {
    margin-top: 16px;
    margin-bottom: 22px;
  }

  .dropdown-button-desktop {
    font-size: 17px;
  }

  .input-header-desktop h6 {
    font-size: 18px;
  }

  .calculo-form-desktop input[type="number"],
  .calc-btn {
    font-size: 18px;
  }

  #resultado-desktop p {
    font-size: 17px;
  }
}

/* ================================================
   MONITORES
   ================================================ */
@media (min-width: 1367px) {
  :root {
    --layout-gutter: clamp(28px, 5vw, 110px);
    --content-max-width: 980px;
  }

  .dropdown-container-desktop {
    margin-top: 18px;
    margin-bottom: 26px;
  }

  .section {
    max-width: 1040px;
    padding-bottom: 52px;
    margin-top: 280px;
  }

  .navbar {
    height: 100px;
  }

  .navbar-logo img {
    width: 95px;
    height: 80px;
  }

  .navbar-logo span {
    font-size: 32px;
  }

  .hero-section h1 {
    font-size: 50px;
    margin-top: 250px;
    margin-left: -200px;
    margin-bottom: 50px;
  }
}
