/* --- PURE CSS RESET & VARIABLES --- */
:root {
  --primary: #61b171;
  --primary-dark: #1d4ed8;
  --bg-body: #f8fafc;
  --bg-card: #ffffff;
  --text-main: #1e293b;
  --text-muted: #64748b;
  --border-color: #e2e8f0;
  --code-bg: #1e293b;
  --sidebar-width: 260px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: "Inter", sans-serif;
}

body {
  background-color: var(--bg-body);
  color: var(--text-main);
  line-height: 1.6;
  scroll-behavior: smooth;
}

.layout {
  width: 70rem;
  margin: 0 auto;
}

header {
  padding: 1rem 0;
  /* box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); */
}

header .layout {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

header img {
  height: 80px;
}

header a.button {
  padding: 1rem 2rem;
  border-radius: 5rem;
  background: linear-gradient(to right, var(--primary), var(--primary-dark));
  color: #fff;
  text-decoration: none;
}

.hero {
  padding: 4rem 0;
  text-align: center;
  /* background: linear-gradient(to right, var(--primary), var(--primary-dark)); */
  background: #f1f1f1;
  color: #fff;
}

.hero p {
  margin: 1rem 0 2rem 0;
  color: #000;
}

.buttons {
  display: flex;
  gap: 1rem;
  width: fit-content;
  margin: 0 auto;
}

.button {
  border: none;
  padding: 1rem 2rem;
  border-radius: 5rem;
  background: linear-gradient(to right, var(--primary), var(--primary-dark));
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  justify-content: center;
  cursor: pointer;
}

.button.secondary-btn {
  position: relative;
  padding: 12px 28px;
  border-radius: 5rem;

  /* Text gradient */
  background: linear-gradient(45deg, var(--primary), var(--primary-dark));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: flex;
  align-items: center;
}

.button.secondary-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 5rem;
  padding: 2px; /* border thickness */

  background: linear-gradient(45deg, var(--primary), var(--primary-dark));
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}

/* 1st button hover: filled -> outline */
.button:hover {
  background: transparent;
  color: transparent; /* we will use gradient text */
  -webkit-text-fill-color: transparent;
  background-image: linear-gradient(45deg, var(--primary), var(--primary-dark));
  -webkit-background-clip: text;
  background-clip: text;
}

/* add gradient border on hover for 1st */
.button:hover::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 5rem;
  padding: 2px;
  background: linear-gradient(45deg, var(--primary), var(--primary-dark));
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}

/* make sure hero a can hold ::before */
.button {
  position: relative;
}

/* 2nd button hover: outline -> filled */
.button.secondary-btn:hover {
  background: linear-gradient(45deg, var(--primary), var(--primary-dark));
  -webkit-background-clip: border-box;
  -webkit-text-fill-color: #fff;
  color: #fff;
}

/* remove fake border on hover for 2nd */
.button.secondary-btn:hover::before {
  opacity: 0;
}

.about {
  padding: 4rem 0;
  text-align: center;
}

.features {
  padding: 4rem 0;
  text-align: center;
  background: #f1f1f1;
}

.features ul {
  list-style: none;
  padding: 0;
  text-align: center;
  margin: 0 auto;
  margin-bottom: 2rem;
}

.features li {
  margin-bottom: 1rem;
}

.testimonials {
  padding: 4rem 0;
  text-align: center;
}

.testimonial-list {
  display: flex;
  gap: 2rem;
  justify-content: center;
  flex-wrap: wrap;
}

.testimonial {
  background: #fff;
  padding: 2rem;
  border-radius: 10px;
  box-shadow: 0 0 50px #aaa5;
  max-width: 300px;
  border: 1px solid var(--border-color);
}

.testimonial p {
  margin-bottom: 1rem;
  font-style: italic;
}

.testimonial cite {
  font-weight: 600;
  color: var(--primary);
}

.pricing {
  padding: 4rem 0;
  text-align: center;
  background: #f1f1f1;
}

.pricing-plans {
  display: flex;
  gap: 2rem;
  justify-content: center;
  flex-wrap: wrap;
}

.plan {
  background: #fff;
  padding: 2rem;
  border-radius: 10px;
  box-shadow: 0 0 50px #aaa5;
  max-width: 300px;
  border: 1px solid var(--border-color);
  text-align: center;
}

.plan-icon {
  width: 50px;
  height: 50px;
  margin-bottom: 1rem;
}

.plan.featured {
  border: 2px solid var(--primary);
  transform: scale(1.05);
}

.plan h3 {
  margin-bottom: 0.5rem;
  color: var(--primary);
}

.plan p {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.plan ul {
  list-style: none;
  padding: 0;
  margin-bottom: 2rem;
}

.plan li {
  margin-bottom: 0.5rem;
}

.faq {
  padding: 4rem 0;
  text-align: center;
  background: #f1f1f1;
}

.faq-list {
  max-width: 800px;
  margin: 0 auto;
  text-align: left;
}

.faq-item {
  margin-bottom: 2rem;
  padding: 1rem;
  background: #fff;
  border-radius: 10px;
  border: 1px solid var(--border-color);
}

.faq-item h3 {
  margin-bottom: 0.5rem;
  color: var(--primary);
}

.features p {
  margin: 1rem 0 2rem 0;
}

.contact {
  padding: 4rem 0;
  text-align: center;
}

.contact .details h2{
    font-size: 6rem;
  background: linear-gradient(45deg, var(--primary), var(--primary-dark));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.contact .layout {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
}

.contact form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 2rem 0;
  width: 50%;
  background: #fff;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  box-shadow: 0 0 50px #aaa5;
  padding: 2rem;
  border-radius: 2rem;
}

.contact form input {
  padding: 1rem;
  border-radius: 1rem;
  border: 1px solid var(--border-color);
  background: #f1f1f1;
  width: 100%;
}

.contact form textarea {
  padding: 1rem;
  border-radius: 1rem;
  border: 1px solid var(--border-color);
  background: #f1f1f1;
  width: 100%;
  height: 200px;
}

/* --- LAYOUT --- */
.wrapper {
  display: flex;
  min-height: 100vh;
}

/* --- SIDEBAR --- */
.sidebar {
  width: var(--sidebar-width);
  background: white;
  border-right: 1px solid var(--border-color);
  padding: 2rem 1.5rem;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text-main);
  margin-bottom: 2.5rem;
}

.brand img {
  width: 100%;
  object-fit: contain;
}

.brand h1 {
  font-size: 1.25rem;
  font-weight: 700;
}

.nav-group {
  margin-bottom: 2rem;
}

.nav-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 0.75rem;
  display: block;
}

.nav-link {
  display: block;
  padding: 0.6rem 0.75rem;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  border-radius: 6px;
  transition: 0.2s;
}

.nav-link:hover {
  background: rgba(37, 99, 235, 0.08);
  color: var(--primary);
}

/* --- MAIN CONTENT --- */
main {
  flex: 1;
  padding: 3rem 2rem;
  max-width: 100%;
}

section {
  margin-bottom: 4rem;
}

h1 {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: #0f172a;
}

h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: #0f172a;
}

h3 {
  font-size: 1.5rem;
  margin-bottom: 1.25rem;
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 0.5rem;
}

h4 {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  font-weight: 600;
}

p {
  margin-bottom: 1rem;
  color: var(--text-muted);
  font-size: 1.05rem;
}

/* --- COMPONENTS --- */
.base-url-box {
  background: var(--primary);
  color: white;
  padding: 1rem 1.5rem;
  border-radius: 8px;
  font-family: "Fira Code", monospace;
  font-weight: 500;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.endpoint-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.method {
  background: var(--primary);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 4px;
  font-weight: 700;
  font-size: 0.85rem;
}

/* Table */
.table-container {
  overflow-x: auto;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  background: white;
  margin-bottom: 2rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

th {
  background: #f1f5f9;
  padding: 0.75rem 1rem;
  font-weight: 600;
  text-align: left;
}

td {
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--border-color);
}

.key-name {
  font-family: "Fira Code", monospace;
  color: var(--primary);
  font-weight: 500;
}

/* Code Blocks */
.tabs {
  display: flex;
  gap: 1rem;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 1rem;
}

.tab-btn {
  background: none;
  border: none;
  padding: 0.5rem 1rem;
  cursor: pointer;
  font-weight: 500;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
}

.tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.code-block {
  background: var(--code-bg);
  color: #f8fafc;
  padding: 1.5rem;
  border-radius: 8px;
  position: relative;
  overflow-x: auto;
  font-size: 0.9rem;
}

.copy-btn {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border: none;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 0.7rem;
  cursor: pointer;
  transition: 0.2s;
}

.copy-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Alert Box */
.alert {
  background: #eff6ff;
  border-left: 4px solid var(--primary);
  padding: 1.5rem;
  border-radius: 0 8px 8px 0;
  color: #1e40af;
}

footer {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.hidden {
  display: none;
}

/* Responsive */
@media (max-width: 1024px) {
  .sidebar {
    width: 220px;
  }
}

@media (max-width: 768px) {
  .wrapper {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    height: auto;
    position: relative;
    border-right: none;
    border-bottom: 1px solid var(--border-color);
    padding: 1rem;
  }

  .brand {
    margin-bottom: 1rem;
    justify-content: center;
  }

  .nav-group {
    margin-bottom: 1rem;
  }

  .nav-link {
    padding: 0.75rem 1rem;
    font-size: 1rem;
    min-height: 44px;
    display: flex;
    align-items: center;
  }

  main {
    padding: 1.5rem 1rem;
    order: 2;
  }

  h2 {
    font-size: 1.75rem;
  }

  h3 {
    font-size: 1.35rem;
  }

  .table-container {
    margin: 0 -1rem;
    border-radius: 0;
    border-left: none;
    border-right: none;
  }

  table {
    font-size: 0.85rem;
  }

  th,
  td {
    padding: 0.6rem 0.75rem;
  }

  .code-block {
    margin: 0 -1rem;
    border-radius: 0;
    font-size: 0.8rem;
    padding: 1rem;
  }

  .copy-btn {
    top: 0.5rem;
    right: 0.5rem;
    padding: 6px 12px;
    font-size: 0.75rem;
  }

  .tabs {
    gap: 0.5rem;
  }

  .tab-btn {
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
    min-height: 44px;
  }

  .endpoint-header {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .base-url-box {
    font-size: 0.9rem;
    word-break: break-all;
    padding: 1rem;
  }

  .alert {
    padding: 1rem;
    margin: 0 -1rem;
    border-radius: 0;
    border-left-width: 3px;
  }

  footer {
    padding: 1.5rem 1rem;
    margin-top: 2rem;
  }
}

@media (max-width: 480px) {
  body {
    font-size: 16px;
  }

  h2 {
    font-size: 1.5rem;
  }

  h3 {
    font-size: 1.2rem;
  }

  .method {
    font-size: 0.75rem;
    padding: 0.2rem 0.5rem;
  }

  .nav-label {
    font-size: 0.65rem;
  }

  .code-block pre {
    white-space: pre-wrap;
    word-wrap: break-word;
  }
}

/* Touch-friendly improvements */
@media (hover: none) and (pointer: coarse) {
  .nav-link:hover {
    background: transparent;
  }

  .nav-link:active {
    background: rgba(37, 99, 235, 0.12);
  }

  .copy-btn:hover {
    background: rgba(255, 255, 255, 0.2);
  }

  .copy-btn:active {
    background: rgba(255, 255, 255, 0.3);
  }

  .tab-btn:hover {
    color: var(--primary);
  }
}
