/* =========================
   RESET
========================= */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  width: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;

  font-family: Arial, sans-serif;
  background: #f5f5f2;
  color: #173d2b;
}

img {
  max-width: 100%;
}


/* =========================
   HEADER
========================= */

.header {
  width: 100%;
  max-width: 100%;

  min-height: 100px;

  background: #ffffff;

  display: flex;
  align-items: center;

  padding: 8px 3%;
  gap: 18px;

  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);

  position: sticky;
  top: 0;
  z-index: 1000;

  overflow: hidden;
}


/* =========================
   LOGO
========================= */

.brand {
  display: flex;
  align-items: center;

  width: 250px;
  height: 85px;

  flex-shrink: 1;
  min-width: 0;
}

.brand img {
  width: 100%;
  height: 100%;

  object-fit: contain;
  object-position: left center;

  display: block;
}


/* =========================
   NAVIGATION
========================= */

.navbar {
  display: flex;
  align-items: center;
  gap: 5px;

  flex-shrink: 0;
}

/* Home pekee ionekane */

.nav-link:not(:first-child) {
  display: none;
}

.nav-link {
  text-decoration: none;

  color: #173d2b;

  font-size: 16px;
  font-weight: 600;

  padding: 16px 22px;

  border-radius: 10px;

  white-space: nowrap;

  transition: 0.2s ease;
}

.nav-link:hover {
  background: #eef4f0;
}

.nav-link.active {
  background: #eef4f0;
  color: #174d32;

  font-weight: bold;
}

.nav-link span {
  margin-right: 6px;
}


/* =========================
   SEARCH BOX
========================= */

.search-box {
  flex: 1;

  min-width: 0;
  max-width: 360px;

  height: 58px;

  display: flex;
  align-items: center;

  background: #ffffff;

  border: 1px solid #d9dfdb;
  border-radius: 14px;

  padding: 0 18px;

  margin-left: auto;
}

.search-box input {
  width: 100%;
  min-width: 0;

  border: none;
  outline: none;

  background: transparent;
  color: #173d2b;

  font-size: 17px;
}

.search-box input::placeholder {
  color: #8c9691;
}

.search-icon {
  flex-shrink: 0;

  font-size: 22px;

  cursor: pointer;
}


/* =========================
   HEADER ACTIONS
========================= */

.header-actions {
  display: flex;
  align-items: center;

  gap: 12px;

  flex-shrink: 0;

  min-width: 0;
}


/* =========================
   TANGAZA BIDHAA BUTTON
========================= */

.post-btn {
  height: 58px;

  border: none;
  border-radius: 12px;

  background: #0f4a32;
  color: #ffffff;

  padding: 0 24px;

  font-size: 16px;
  font-weight: bold;

  cursor: pointer;

  white-space: nowrap;

  transition: 0.2s ease;
}

.post-btn:hover {
  background: #0a3825;
  transform: translateY(-1px);
}

.post-btn span {
  font-size: 22px;
  margin-right: 7px;
}


/* =========================
   LOGIN BUTTON
========================= */

.login-btn {
  height: 58px;

  display: flex;
  align-items: center;

  gap: 7px;

  background: #ffffff;
  color: #173d2b;

  border: 1px solid #d9dfdb;
  border-radius: 12px;

  padding: 0 18px;

  font-size: 16px;

  cursor: pointer;

  white-space: nowrap;

  transition: 0.2s ease;
}

.login-btn:hover {
  background: #f4f7f5;
}

.login-btn span {
  font-size: 19px;
}

.login-btn small {
  font-size: 15px;
  margin-left: 2px;
}


/* =========================
   HERO IMAGE
========================= */

.hero {
  width: 100%;
  max-width: 100%;

  background: #103f2b;

  overflow: hidden;
}

.hero img {
  width: 100%;
  max-width: 100%;

  height: auto;

  display: block;

  object-fit: contain;
}


/* =========================
   PRODUCTS SECTION
========================= */

.categories-section {
  width: 100%;
  max-width: 100%;

  padding: 40px 3% 60px;
}


/* =========================
   SECTION TITLE
========================= */

.section-title {
  width: 100%;

  margin-bottom: 30px;

  text-align: center;

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

.section-title h2 {
  margin: 0;

  font-size: 35px;

  color: #173d2b;

  text-align: center;
}

.section-title p {
  display: none;
}


/* =========================
   CATEGORY GRID
========================= */

.categories {
  width: 100%;

  display: grid;

  grid-template-columns: repeat(4, minmax(0, 1fr));

  gap: 20px;
}


/* =========================
   CATEGORY CARD
========================= */

.category-card {
  min-width: 0;

  background: #103f2b;

  border-radius: 20px;

  overflow: hidden;

  cursor: pointer;

  transition: 0.25s ease;

  box-shadow: 0 5px 18px rgba(0, 0, 0, 0.12);
}

.category-card:hover {
  transform: translateY(-7px);

  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.2);
}


/* =========================
   CATEGORY IMAGE
========================= */

.category-card img {
  width: 100%;
  max-width: 100%;

  height: 240px;

  display: block;

  object-fit: cover;
}


/* =========================
   CATEGORY INFO
========================= */

.category-info {
  min-height: 190px;

  padding: 28px;

  color: #ffffff;

  display: flex;

  justify-content: space-between;
  align-items: center;

  gap: 15px;

  min-width: 0;
}

.category-info h2 {
  margin: 0 0 15px;

  font-size: 28px;

  line-height: 1.2;

  overflow-wrap: break-word;
}

.category-info h2 span {
  font-size: 20px;

  font-weight: normal;

  color: #c6d0cb;
}

.category-info p {
  margin: 0;

  color: #e0e6e2;

  font-size: 17px;

  line-height: 1.5;

  overflow-wrap: break-word;
}


/* =========================
   CATEGORY ARROW
========================= */

.category-info button {
  min-width: 72px;
  width: 72px;
  height: 72px;

  flex-shrink: 0;

  border-radius: 50%;
  border: none;

  background: #ffb800;
  color: #173d2b;

  font-size: 38px;

  cursor: pointer;

  display: flex;

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

  transition: 0.2s ease;
}

.category-info button:hover {
  transform: scale(1.08);

  background: #e5a500;
}


/* =========================
   ABOUT KILIMOSOKO
========================= */

.about-section {
  width: 100%;
  max-width: 100%;

  margin: 0;

  padding: 30px 20px 50px;

  background: #f5f5f2;

  display: flex;

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

  overflow: hidden;
}

.about-section img {
  width: 100%;
  max-width: 1100px;

  height: auto;

  display: block;

  margin: 0 auto;

  border-radius: 8px;
}


/* =========================
   FOOTER
========================= */

footer {
  width: 100%;
  max-width: 100%;

  background: #103f2b;
  color: #ffffff;

  text-align: center;

  padding: 35px 20px 25px;

  overflow: hidden;
}


/* =========================
   FOOTER LOGO
========================= */

.footer-logo {
  width: 180px;
  max-width: 100%;

  height: 65px;

  margin: 0 auto 8px;
}

.footer-logo img {
  width: 100%;
  height: 100%;

  object-fit: contain;

  display: block;
}


/* =========================
   FOOTER TAGLINE
========================= */

.footer-tagline {
  margin: 5px 0 25px !important;

  color: #ffffff !important;

  font-size: 20px;
}


/* =========================
   FOOTER CONTACT
========================= */

.footer-contact {
  width: 100%;

  text-align: center;
}

.footer-contact h3 {
  margin: 0 0 20px;

  color: #ffffff;

  font-size: 28px;
}


/* =========================
   CONTACT DETAILS
========================= */

.contact-details {
  width: 100%;

  display: flex;

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

  gap: 45px;

  flex-wrap: wrap;
}

.contact-item,
.contact-item:visited,
.contact-item:active {
  display: inline-flex;

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

  gap: 12px;

  color: #ffffff !important;

  text-decoration: none !important;

  font-size: 18px;

  max-width: 100%;

  overflow-wrap: break-word;
}

.contact-item:hover {
  color: #ffb800 !important;
}


/* =========================
   CONTACT ICON
========================= */

.contact-icon {
  width: 42px;
  height: 42px;

  flex-shrink: 0;

  background: #2f7d32;

  border-radius: 50%;

  display: inline-flex;

  align-items: center;
  justify-content: center;
}

.phone-icon::before {
  content: "☎";

  color: #ffffff;

  font-size: 21px;
}

.email-icon::before {
  content: "✉";

  color: #ffffff;

  font-size: 20px;
}


/* =========================
   FOOTER LINE
========================= */

.footer-line {
  width: 80%;
  max-width: 900px;

  height: 1px;

  background: rgba(255, 255, 255, 0.2);

  margin: 30px auto 20px;
}


/* =========================
   COPYRIGHT
========================= */

.copyright {
  margin: 0 !important;

  color: #dbe5df !important;

  font-size: 17px;

  text-align: center;
}


/* =========================
   MODALS
========================= */

.modal {
  display: none;

  position: fixed;
  inset: 0;

  width: 100%;
  max-width: 100%;

  background: rgba(0, 0, 0, 0.55);

  z-index: 9999;

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

  padding: 20px;

  overflow-y: auto;
  overflow-x: hidden;
}

.modal.show {
  display: flex;
}


/* =========================
   MODAL CONTENT
========================= */

.modal-content {
  width: 100%;
  max-width: 650px;

  max-height: 90vh;

  overflow-y: auto;
  overflow-x: hidden;

  position: relative;

  background: #ffffff;

  border-radius: 18px;

  padding: 35px;

  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.login-modal-content,
.register-modal-content {
  max-width: 500px;
}


/* =========================
   MODAL CLOSE BUTTON
========================= */

.close-modal {
  position: absolute;

  top: 15px;
  right: 18px;

  width: 38px;
  height: 38px;

  border: none;

  border-radius: 50%;

  background: #f1f3f2;

  color: #173d2b;

  font-size: 28px;

  cursor: pointer;
}

.close-modal:hover {
  background: #e2e8e4;
}


/* =========================
   MODAL TITLE
========================= */

.modal-content h2 {
  margin: 0;

  text-align: center;

  color: #173d2b;

  font-size: 30px;
}

.modal-subtitle {
  text-align: center;

  color: #66736c;

  margin-bottom: 30px;
}


/* =========================
   FORM
========================= */

.form-group {
  width: 100%;

  margin-bottom: 18px;
}

.form-group label {
  display: block;

  margin-bottom: 7px;

  font-weight: 600;

  color: #173d2b;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  max-width: 100%;

  padding: 13px 14px;

  border: 1px solid #d9dfdb;

  border-radius: 8px;

  outline: none;

  font-size: 15px;

  font-family: Arial, sans-serif;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: #0f4a32;

  box-shadow: 0 0 0 3px rgba(15, 74, 50, 0.08);
}

.form-group textarea {
  min-height: 110px;

  resize: vertical;
}


/* =========================
   PASSWORD WRAPPER
========================= */

.password-wrapper {
  position: relative;

  width: 100%;

  min-width: 0;
}

.password-wrapper input {
  padding-right: 55px;
}


/* =========================
   SHOW / HIDE PASSWORD
========================= */

.toggle-password {
  position: absolute;

  top: 50%;
  right: 12px;

  transform: translateY(-50%);

  width: 38px;
  height: 38px;

  border: none;

  background: transparent;

  cursor: pointer;

  font-size: 18px;

  display: flex;

  align-items: center;
  justify-content: center;
}


/* =========================
   FORGOT PASSWORD
========================= */

.forgot-password {
  width: 100%;

  text-align: right;

  margin-top: -5px;
  margin-bottom: 20px;
}

.forgot-password button {
  border: none;

  background: transparent;

  color: #0f4a32;

  font-size: 14px;
  font-weight: 600;

  cursor: pointer;

  padding: 0;
}

.forgot-password button:hover {
  text-decoration: underline;
}


/* =========================
   REGISTER TEXT
========================= */

.register-text {
  text-align: center;

  margin: 22px 0 0;

  color: #66736c;

  font-size: 15px;
}

.register-text button {
  border: none;

  background: transparent;

  color: #0f4a32;

  font-weight: bold;

  font-size: 15px;

  cursor: pointer;

  padding: 0 3px;
}

.register-text button:hover {
  text-decoration: underline;
}


/* =========================
   SUBMIT BUTTON
========================= */

.submit-listing-btn {
  width: 100%;
  max-width: 100%;

  padding: 15px;

  border: none;

  border-radius: 8px;

  background: #0f4a32;

  color: #ffffff;

  font-size: 16px;
  font-weight: bold;

  cursor: pointer;

  transition: 0.2s ease;
}

.submit-listing-btn:hover {
  background: #0a3825;

  transform: translateY(-1px);
}

#loginForm .submit-listing-btn,
#registerForm .submit-listing-btn {
  margin-top: 5px;
}


/* =========================
   MODAL ANIMATION
========================= */

.modal.show .modal-content {
  animation: modalOpen 0.25s ease;
}

@keyframes modalOpen {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.97);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}


/* =========================
   LARGE / MEDIUM DESKTOP
========================= */

@media (max-width: 1400px) {

  .header {
    gap: 12px;

    padding-left: 2%;
    padding-right: 2%;
  }

  .brand {
    width: 210px;
    height: 75px;
  }

  .search-box {
    max-width: none;

    width: clamp(180px, 22vw, 360px);
  }

  .post-btn {
    padding: 0 18px;
  }

  .login-btn {
    padding: 0 14px;
  }

}


/* =========================
   TABLET
========================= */

@media (max-width: 1050px) {

  .header {
    min-height: auto;

    flex-wrap: wrap;
  }

  .brand {
    width: 190px;
    height: 65px;
  }

  .navbar {
    order: 1;
  }

  .header-actions {
    margin-left: auto;

    order: 2;
  }

  .search-box {
    order: 3;

    width: 100%;
    max-width: 100%;

    flex-basis: 100%;

    margin-left: 0;
  }

  .categories {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .about-section img {
    max-width: 950px;
  }

}


/* =========================
   MOBILE
========================= */

@media (max-width: 850px) {

  .header {
    padding: 10px 15px;

    gap: 10px;
  }

  .brand {
    width: 170px;
    height: 60px;
  }

  .navbar {
    display: none;
  }

  .header-actions {
    gap: 8px;
  }

  .search-box {
    width: 100%;

    height: 52px;
  }

  .about-section {
    padding: 25px 15px 40px;
  }

  .about-section img {
    width: 100%;

    max-width: 100%;
  }

}


/* =========================
   SMALL MOBILE
========================= */

@media (max-width: 650px) {

  .header {
    width: 100%;

    min-height: auto;

    padding: 10px;

    gap: 8px;

    flex-wrap: wrap;
  }

  .brand {
    width: 135px;
    height: 52px;

    flex-shrink: 1;

    min-width: 0;
  }

  .header-actions {
    margin-left: auto;

    gap: 6px;

    min-width: 0;
  }

  .post-btn {
    height: 46px;

    padding: 0 9px;

    font-size: 11px;
  }

  .post-btn span {
    font-size: 16px;

    margin-right: 2px;
  }

  .login-btn {
    height: 46px;

    padding: 0 8px;

    font-size: 11px;
  }

  .login-btn span {
    font-size: 16px;
  }

  .login-btn small {
    font-size: 11px;
  }

  .search-box {
    flex-basis: 100%;

    width: 100%;

    min-width: 0;

    height: 48px;
  }


  /* PRODUCTS */

  .categories-section {
    padding: 35px 15px 50px;
  }

  .section-title {
    margin-bottom: 22px;
  }

  .section-title h2 {
    font-size: 28px;

    line-height: 1.3;
  }

  .categories {
    grid-template-columns: minmax(0, 1fr);
  }

  .category-card img {
    height: 230px;
  }

  .category-info {
    min-height: 160px;

    padding: 22px;
  }

  .category-info h2 {
    font-size: 25px;
  }

  .category-info p {
    font-size: 15px;
  }

  .category-info button {
    min-width: 62px;

    width: 62px;
    height: 62px;

    font-size: 30px;
  }


  /* ABOUT */

  .about-section {
    padding: 20px 10px 35px;
  }

  .about-section img {
    width: 100%;

    border-radius: 5px;
  }


  /* FOOTER */

  footer {
    padding: 30px 15px 25px;
  }

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

  .footer-tagline {
    font-size: 17px;
  }

  .footer-contact h3 {
    font-size: 24px;
  }

  .contact-details {
    flex-direction: column;

    gap: 18px;
  }

  .contact-item,
  .contact-item:visited,
  .contact-item:active {
    font-size: 16px;

    text-align: center;

    white-space: normal;
  }

  .contact-icon {
    width: 38px;
    height: 38px;
  }

  .footer-line {
    width: 90%;
  }

  .copyright {
    font-size: 15px;
  }


  /* MODALS */

  .modal {
    padding: 10px;

    align-items: flex-start;
  }

  .modal-content {
    width: 100%;

    padding: 30px 20px;

    margin-top: 10px;

    border-radius: 14px;
  }

  .modal-content h2 {
    font-size: 25px;
  }

  .login-modal-content,
  .register-modal-content {
    max-width: 100%;
  }

  .forgot-password {
    margin-bottom: 18px;
  }

  .register-text,
  .register-text button {
    font-size: 14px;
  }

}


/* =========================
   EXTRA SMALL SCREENS
========================= */

@media (max-width: 430px) {

  .header {
    padding: 8px;
  }

  .brand {
    width: 115px;
    height: 48px;
  }

  .header-actions {
    gap: 4px;
  }

  .post-btn {
    height: 42px;

    padding: 0 7px;

    font-size: 10px;
  }

  .post-btn span {
    font-size: 14px;
  }

  .login-btn {
    height: 42px;

    padding: 0 7px;

    font-size: 10px;
  }

  .login-btn span {
    font-size: 14px;
  }

  .login-btn small {
    font-size: 10px;
  }

}