/* ================= ROOT BRAND COLORS ================= */
/* Branding variables for theme customization and quick color adjustments */
:root {
  --primary: #1BA4A3;       /* Main Teal Brand Color */
  --primary-dark: #0F6C6B;  /* Deep Teal Hover Accent */
  --light-gray: #BFC7CE;    /* Soft Gray Utility */
  --text-dark: #111827;     /* Main heading text color */
  --text-gray: #374151;     /* Regular UI text color */
  --background-soft: #E7F7F7; /* Soft background highlight blocks */
}

/* ================= GLOBAL RESET ================= */
/* Reset default browser spacing & ensure consistent layout */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Global typography and page structure */
body {
  font-family: "Inter", sans-serif;
  background: #ffffff;
  color: var(--text-dark);
  line-height: 1.6;
}

/* Smooth scrolling for anchor links */
html {
  scroll-behavior: smooth;
}

/* Prevent anchor sections from hiding behind sticky navbar */
section, .container {
  scroll-margin-top: 120px;
}

/* ================= NAVBAR ================= */
/* Sticky navigation bar fixed at top */
.navbar {
  position: sticky;
  top: 0;
  width: 100%;
  background: #ffffff;
  z-index: 999;
  padding: 14px 0;
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
}

/* Container for navbar alignment */
.nav-container {
  max-width: 1100px;
  margin: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
}

.nav-logo {
  font-size: 22px;
  font-weight: 700;
  color: var(--primary);
}

/* Navigation Menu Links */
.nav-links {
  display: flex;
  list-style: none;
  gap: 28px;
}

.nav-links a {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-gray);
  text-decoration: none;
  transition: 0.3s;
}

/* Active & hover */
.nav-links a:hover,
.nav-links a.active {
  color: var(--primary) !important;
  font-weight: 700;
  border-bottom: 3px solid var(--primary);
  padding-bottom: 6px;
}

/* ================= HEADER ================= */
.title {
  text-align: center;
  font-size: 44px;
  font-weight: 700;
  margin-top: 40px;
}

.subtitle {
  text-align: center;
  font-size: 18px;
  margin-top: 8px;
  color: #4b5563;
}

/* ================= CONVERTER BOX ================= */
.container {
  max-width: 900px;
  margin: 50px auto;
  background: #ffffff;
  padding: 40px;
  border-radius: 18px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  text-align: center;
}

.tool-heading {
  font-size: 26px;
  font-weight: 700;
}

.description {
  color: #4b5563;
  margin-bottom: 20px;
}

/* Generic input fields */
input, select {
  width: 100%;
  padding: 14px;
  border-radius: 12px;
  border: 1px solid #d1d5db;
  font-size: 16px;
  margin-top: 8px;
}

/* Row layout for base selection */
.select-row {
  display: flex;
  gap: 20px;
  margin-top: 20px;
}

/* Swap Button */
.swap-btn {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 10px 18px;
  border-radius: 10px;
  margin-top: 30px;
  font-weight: 600;
  cursor: pointer;
}

.swap-btn:hover {
  background: var(--primary-dark);
}

/* Example buttons */
.exampleBtn {
  background: var(--primary);
  color: #fff;
  padding: 10px 18px;
  border-radius: 10px;
  border: none;
  margin: 5px;
  cursor: pointer;
  font-weight: 600;
}

.exampleBtn:hover {
  background: var(--primary-dark);
}

/* Convert button */
.convert-btn {
  width: 100%;
  padding: 16px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 14px;
  font-size: 18px;
  font-weight: 700;
  margin-top: 25px;
  cursor: pointer;
}

.convert-btn:hover {
  background: var(--primary-dark);
}

/* Conversion results display */
.result-box {
  margin-top: 25px;
  padding: 22px;
  background: var(--background-soft);
  border-radius: 14px;
  font-weight: 600;
  font-size: 18px;
}

/* ================= SECTION TITLES ================= */
.info-section {
  margin: 80px auto;
  max-width: 1100px;
  text-align: center;
  padding: 0 20px;
}

.section-title {
  font-size: 40px;
  font-weight: 700;
  margin-bottom: 25px;
}

.section-title::after {
  content: "";
  width: 80px;
  height: 3px;
  margin: 14px auto 0;
  background: var(--primary);
  display: block;
  border-radius: 6px;
}

/* ================= TABLE ================= */
.base-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 17px;
  margin-top: 35px;
}

.base-table th {
  background: var(--primary);
  color: #ffffff;
  padding: 18px;
}

.base-table td {
  padding: 18px;
  border-bottom: 1px solid #eee;
  font-weight: 500;
}

/* ================= MISTAKES SECTION ================= */
.mistakes-box {
  background: #fff5f5;
  padding: 35px;
  border-radius: 18px;
  margin-top: 45px;
  text-align: left;
}

.mistakes-grid {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.mistake-card {
  flex: 1;
  min-width: 250px;
  background: #ffffff;
  padding: 22px;
  border-radius: 16px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.06);
}

/* ================= HOW TO CONVERT ================= */
.convert-text {
  font-size: 18px;
  max-width: 900px;
  margin: 0 auto 25px;
}

.formula-box {
  background: #DFF5F5;
  padding: 26px;
  border-radius: 16px;
  font-size: 18px;
}

.two-col {
  display: flex;
  gap: 35px;
  margin-top: 25px;
}

.algorithm-box, .properties-box {
  flex: 1;
  background: #f1fcfc;
  padding: 28px;
  border-radius: 18px;
  text-align: left;
}

/* ================= EXAMPLES ================= */
.examples-grid {
  display: flex;
  gap: 25px;
  flex-wrap: wrap;
  margin-top: 35px;
}

.example-card {
  flex: 1;
  min-width: 300px;
  background: #fff;
  border-radius: 18px;
  padding: 28px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.08);
}

.example-head {
  background: #E3F6F6;
  padding: 15px;
  border-radius: 12px;
  font-size: 18px;
  font-weight: 600;
  text-align: center;
}

.example-result {
  margin-top: 20px;
  background: #CFF5F5;
  padding: 18px;
  border-radius: 16px;
  font-size: 32px;
  font-weight: 700;
  color: var(--primary);
  text-align: center;
}

/* ================= LOGO IMAGE ================= */
.nav-logo-img {
  height: 50px;
  width: auto;
  display: block;
}

.nav-logo-img:hover {
  transform: scale(1.05); 
  transition: 0.3s;
  cursor: pointer;
}

/* ================= FOOTER DESIGN LIKE SCREENSHOT ================= */
.footer {
  background: #E7F7F7;
  padding: 70px 20px 40px;
  margin-top: 100px;
}

.footer-container {
  max-width: 1150px;
  margin: auto;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 50px;
}

.footer-col {
  flex: 1;
  min-width: 260px;
}

.footer-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 18px;
}

.footer-text {
  font-size: 16px;
  color: #374151;
  line-height: 1.6;
  max-width: 90%;
}

.footer-links {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links li a {
  text-decoration: none;
  color: #374151;
  font-size: 16px;
  font-weight: 500;
  transition: 0.25s;
}

.footer-links li a:hover {
  color: var(--primary-dark);
}

.footer-divider {
  width: 100%;
  height: 1px;
  background: #b3c5c5;
  margin: 40px auto;
}

.footer-bottom {
  text-align: center;
  color: #374151;
  font-size: 15px;
}

.footer-bottom strong {
  color: var(--primary);
}

/* ================= HAMBURGER MENU ================= */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
}

.hamburger span {
  width: 26px;
  height: 3px;
  background: var(--text-dark);
  border-radius: 4px;
}

/* ================= RESPONSIVE NAVBAR ================= */
@media (max-width: 768px) {
  .hamburger {
    display: flex;
  }

  .nav-links {
    position: absolute;
    top: 80px;
    right: 20px;
    background: #ffffff;
    flex-direction: column;
    width: 220px;
    padding: 20px;
    gap: 18px;
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    display: none;
  }

  .nav-links.active {
    display: flex;
  }
}
.swap-btn {
  width: 48px;
  height: 48px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;

  display: flex;
  align-items: center;
  justify-content: center;

  margin-top: 0;          /* remove top offset */
  align-self: center;     /* vertical center in row */
}

.swap-btn:hover {
  background: var(--primary-dark);
}
