* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

body {
  background-color: #f4f4f4;
  color: #222;
  line-height: 1.6;
  margin: 0;
  padding: 0;
  padding-top: 110px;
}

main {
  width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 10px 20px;
}

h1 {
  font-size: clamp(1.6rem, 6vw, 2.2rem);
  margin-bottom: clamp(16px, 5vw, 30px);
  text-align: center;
}
h2,
h3,
h4 {
  font-size: clamp(1.1rem, 4vw, 1.4rem);
  margin-bottom: clamp(10px, 3.5vw, 15px);
  text-align: center;
}
p {
  font-size: clamp(0.95rem, 3.5vw, 1rem);
  line-height: 1.75;
  text-align: justify;
  text-indent: 1.5em;
}

.tab-container {
  width: 85%;
  margin: 0 auto;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

.tabs {
  display: flex;
  background: #fafafa;
  border-bottom: 1px solid #ddd;
}

.tab {
  flex: 1;
  padding: 14px;
  cursor: pointer;
  border: none;
  background: none;
  font-weight: 600;
  transition: background 0.3s, color 0.3s;
}

.tab:hover {
  background: #ece6df;
}

.tab.active {
  background: #fff;
  color: #000000;
  border-bottom: 5px solid #e9c198;
}

.tab-content {
  padding: 30px;
}

.content {
  display: none;
  animation: fadeIn 0.3s ease;
}

.content.active {
  display: block;
}

.overview-text {
  max-width: 900px;
  margin: 0 auto 30px auto;
}

.overview-image {
  text-align: center;
}

.overview-image img {
  margin-top: 20px;
  max-width: auto;
  height: 500px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.overview-image img:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

ul {
  margin: 15px 0 0 20px;
  line-height: 1.8;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateX(10px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

#imageWrap {
  touch-action: pan-y;
}

.overview-image img.fadeIn {
  animation: fadeIn 0.6s ease-in-out;
}

/* Tech & Features layout */
.tech-details {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  margin-top: 20px;
}

.features-section,
.tech-stack-section {
  flex: 1;
  min-width: 280px;
}

.features-table {
  width: 100%;
  border-collapse: collapse;
  margin: 15px 0;
  font-size: 0.95rem;
}

.features-table th,
.features-table td {
  border: 1px solid #ddd;
  padding: 10px 14px;
  text-align: left;
  vertical-align: top;
}

.features-table th {
  background-color: #f7f7f7;
  font-weight: 600;
  color: #000;
  text-align: center;
}

.features-table tr:nth-child(even) {
  background-color: #fafafa;
}

.button-container {
  display: flex;
  flex-direction: row;
  justify-content: center;
  gap: 20px;
}

.button-container button {
  padding: 12px 24px;
  font-size: 1rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  background-color: #e9ded3;
  color: #000000;
  font-weight: 600;
  transition: background-color 1s ease, transform 1s ease;
}

.button-container button:hover {
  background-color: #0a5cff;
  color: #fff;
  transform: translateY(-2px);
}

.image-navigation {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  margin-top: 20px;
}

.previous,
.next {
  background-color: #e9ded3;
  color: #000000;
  border: none;
  border-radius: 50%;
  min-width: 70px;
  min-height: 70px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  transition: background-color 0.3s ease, transform 0.3s ease;
}

.dots {
  text-align: center;
  margin-top: 10px;
}

.dot {
  height: 12px;
  width: 12px;
  margin: 0 4px;
  background-color: #bbb;
  border-radius: 50%;
  display: inline-block;
  transition: background-color 0.3s;
  cursor: pointer;
}

.dot.active {
  background-color: #333;
}

/* Mobile adjustments */
@media (max-width: 768px) {
  .tab-container {
    width: 95%;
    padding: 15px;
  }

  .tab {
    font-size: 0.9rem;
    padding: 10px;
  }

  .tab-content {
    padding: 20px 10px;
  }

  .overview-image img {
    max-width: 90%;
    max-height: 300px;
    margin-top: 15px;
  }

  .tech-details {
    flex-direction: column;
    gap: 20px;
  }

  .button-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 2 buttons per row */
    gap: 12px;
    width: 100%;
  }

  .button-container button {
    width: 100%;
    padding: 10px;
    font-size: 0.9rem;
  }
}

/* ---------- Tablets & down ---------- */
@media (max-width: 768px) {
  .tab-container {
    width: 100%;
    margin: 0;
    border-radius: 12px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
  }

  .tabs {
    display: flex;
    width: 100%;
    gap: 6px;
    padding: 6px;
    overflow-x: visible;
  }

  .tab {
    flex: 1 1 0;
    padding: 12px;
    font-size: 0.95rem;
    border-radius: 10px;
    background: #fff;
    border: 1px solid #eee;
    text-align: center;
  }
  .tab.active {
    border-bottom-width: 2px;
  }

  .tab-content {
    padding: 18px 14px;
  }

  .overview-text {
    max-width: 100%;
    margin: 0 0 18px 0;
  }

  .overview-image img {
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: 60vh;
    margin-top: 12px;
    object-fit: contain;
    border-radius: 10px;
  }

  .tech-details {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin-top: 14px;
  }

  .features-table {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    font-size: 0.92rem;
  }
  .features-table th,
  .features-table td {
    padding: 10px 12px;
  }

  .image-navigation {
    flex-direction: column;
    align-items: center;
    gap: 12px;
  }
  .previous,
  .next {
    display: none;
  }

  .dots {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 6px;
  }
  .dot {
    width: 10px;
    height: 10px;
    margin: 0 5px;
  }
}

/* ---------- Small phones ---------- */
@media (max-width: 480px) {
  .tab-container {
    border-radius: 10px;
  }

  .tab {
    font-size: 0.88rem;
    padding: 8px 10px;
  }

  .tab-content {
    padding: 14px 10px;
  }

  .overview-image img {
    max-height: 50vh;
    margin-top: 10px;
  }

  .button-container {
    grid-template-columns: 1fr;
    gap: 10px;
    width: 100%;
  }
  .button-container button {
    font-size: 0.9rem;
    padding: 9px 12px;
  }

  .previous,
  .next {
    min-width: 48px;
    min-height: 48px;
    font-size: 0.95rem;
  }

  .dot {
    width: 9px;
    height: 9px;
    margin: 0 4px;
  }
}
