:root {
  --primary-color: #0056b3;
  --primary-hover: #004494;
  --success-color: #054691;
  --light-gray: #f8f9fa;
  --medium-gray: #e9ecef;
  --border-color: #dee2e6;
  --text-dark: #212529;
  --text-light: #495057;
  --box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  --light-orange-bg: #fff4e5;
}

html {
  height: 100%;
  overflow-x: hidden;
  scroll-behavior: smooth; 
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  width: 100%; 
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  overflow-y: hidden; 
  margin: 0; 
}

main {
  flex-grow: 1;
}


.content-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem; 
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem;
}

#main-content {
  flex: 1 1 0;
  max-width: 800px;
  margin: 0;
  margin-top: 50px;
  line-height: 1.6;
}

.sidebar {
  flex: 0 0 300px; 
  margin: 0;
  margin-top: 50px;
}

header {
  position: relative;
  z-index: 3;
}

.navbar {
  box-shadow: 0 2px 4px rgba(0,0,0,.04);
}

.navbar-brand {
  font-size: 1.5rem;
  font-weight: 700;
}

.navbar-light .navbar-brand {
  color: #000000;
}

.navbar-light .navbar-nav .nav-link:hover,
.navbar-light .navbar-nav .nav-link.active {
  color: var(--primary-color);
}

.sidebar-title {
  margin-top: 0;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--primary-color);
  color: var(--text-dark);
  font-size: 1.25rem;
}

.conversion-box h1 {
  font-size: 1.8rem;
  font-weight: 600;
  margin-bottom: 15px;
}

.lead-description {
  font-size: 1rem;
  color: var(--text-light);
}

#sentenceResult {
  font-size: 1.2em;
  font-weight: bold;
  color: rgb(3, 34, 145);
  border: 1px solid rgb(243, 239, 203);
  background-color: rgb(253, 253, 253);
  padding: 8px;
  border-radius: 5px;
}

.calculation-area {
  padding: .5rem;
  background-color: var(--light-orange-bg);
  border-radius: 5px;
  margin-bottom: 1.2rem;
  text-align: center;
  box-shadow: var(--box-shadow);
  border: 1px solid var(--border-color);
}

.input-result-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.input-container, .result-container {
  flex: 1 1 0;
  min-width: 0;
}

#inputValue {
  font-size: 1.8rem;
  font-weight: 500;
  text-align: center;
  border: 2px solid var(--border-color);
  border-radius: 0.375rem;
  padding: 0.5rem;
  width: 100%;
}

#outputResult {
  font-size: 1.8rem;
  font-weight: 500;
  color: rgb(27, 104, 13);
  margin: 0;
  word-break: break-all;
}

.equals-sign {
  font-size: 2rem;
  font-weight: bold;
  color: var(--text-light);
}

.conversion-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
}

.conversion-controls select {
  padding: 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: 0.375rem;
  flex-grow: 1;
  min-width: 0;
}

.dynamic-sections, .information-section, .more-conversions-container {
  padding: 0.75rem;
  background-color: #ffffff;
  border-radius: 5px;
  border: 1px solid var(--border-color);
  margin-bottom: 1.5rem;
}

.code-box {
  background-color: rgb(250, 248, 247);
  padding: 1.2rem;
  border-radius: 5px;
  font-family: 'Courier New', Courier, monospace;
  font-weight: bold;
  word-wrap: break-word;
  font-size: 1.2rem;
  color: #031353;
}

#reverse-conversion-link-container {
  text-align: center;
  margin-top: 0.5rem;
  margin-bottom: 2rem;
}

#reverse-conversion-link-container a {
  font-weight: 500;
  text-decoration: none;
  color: var(--primary-color);
  border: 1px solid var(--border-color);
  padding: 0.5rem 1rem;
  border-radius: 50px;
  transition: all 0.2s ease-in-out;
}

#reverse-conversion-link-container a:hover {
  background-color: var(--primary-color);
  color: #ffffff;
  border-color: var(--primary-color);
}

.hero-section {
  position: relative;
  padding: 6rem 1rem;
  background-size: cover;
  background-position: center center;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 40, 85, 0.7);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero-content h1 {
  color: #fff;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.hero-content .lead {
  color: rgba(255, 255, 255, 0.9);
}

.section-title {
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-dark);
  border-bottom: 3px solid var(--primary-color);
  padding-bottom: 0.75rem;
  display: inline-block;
}

.category-card {
  position: relative; 
  background-color: #fff;
  border: 1px solid var(--border-color);
  border-radius: 5px;
  padding: 0.75rem;
  text-align: center;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.category-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.category-card-icon {
  font-size: 3rem;
  line-height: 1;
  margin-bottom: 1rem;
}

.category-card h3 {
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.category-card p {
  color: var(--text-light);
  flex-grow: 1;
  margin-bottom: 1.5rem;
}

.category-card .btn {
  width: 100%;
}

.related-list {
  list-style: none;
  padding: 0;
}
.related-list li a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  text-decoration: none;
  color: var(--primary-color);
  background-color: #ffffff;
  border-radius: 5px;
  margin-bottom: 0.5rem;
  transition: all 0.2s ease-in-out;
  border: 1px solid var(--border-color);
}
.related-list li a:hover {
  background-color: var(--light-gray);
  transform: translateX(5px);
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}
.related-list .arrow {
  font-weight: bold;
}

.site-footer {
  background-color: #000000;
  color: #adb5bd;
  padding: 3rem 0 1.5rem 0;
  margin-top: 60px;
}

.footer-content {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid #343a40;
}

.footer-section {
  flex: 1;
  min-width: 200px;
}

.site-footer h4 {
  color: #ffffff;
  margin-bottom: 1rem;
  font-size: 1.1rem;
  font-weight: 600;
}

.site-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.site-footer ul li {
  margin-bottom: 0.5rem;
}

.site-footer a {
  color: #adb5bd;
  text-decoration: none;
  transition: color 0.2s;
}

.site-footer a:hover {
  color: #ffffff;
  text-decoration: underline;
}

.copy {
  text-align: center;
  font-size: 0.9rem;
  color: #6c757d;
  margin: 0;
}


@media (max-width: 991.98px) {
  .content-wrapper {
      flex-direction: column;
  }
  #main-content {
      margin: 0 auto;
  }
  .sidebar {
      width: 100%;
      margin: 1.5rem auto 0 auto;
  }
}

@media (max-width: 768px) {
  .footer-content {
      flex-direction: column;
      text-align: center;
  }
}

@media (max-width: 576px) {
  .container-xl {
      padding-left: 0.75rem;
      padding-right: 0.75rem;
  }
  .conversion-box h1 {
      font-size: 1.5rem;
  }
  #inputValue, #outputResult {
      font-size: 1.2rem;
  }
  .equals-sign {
      font-size: 1rem;
  }
  .calculation-area {
      padding: 0.5rem;
  }
}
