/* ============================================================
   STYLE.CSS — Shared styles used across ALL pages
   Blues Home Helpers — Nakuru
   ============================================================ */

/* ===== BASE ===== */
*, *::before, *::after {
  box-sizing: border-box;
}
body {
  padding: 0;
  margin: 0;
  font-family: 'Plus Jakarta Sans', Arial, sans-serif;
  background: #f9f9f9;
  color: #333;
  position: relative;
}
html {
  scroll-behavior: smooth;
  transition: all ease 0.3s;
}

/* ===== FLASH ALERT MESSAGES ===== */
.alert {
  position: fixed;
  top: 70px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 999;
  padding: 12px 28px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  animation: slideDown 0.4s ease;
  white-space: nowrap;
}
.alert.success { background: #2ecc71; color: #fff; }
.alert.error   { background: #e74c3c; color: #fff; }
@keyframes slideDown {
  from { opacity: 0; transform: translate(-50%, -20px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}

/* ===== NAVBAR ===== */
.navbar__container {
  position: relative;
  z-index: 3;
}
.navbar {
  background: #0a3d62;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 3;
  padding: 4px 10px;
}
.nav__ul {
  display: none;
  list-style: none;
  margin: 0;
  padding: 0;
}
.logo {
  width: 120px;
  margin: 0;
  z-index: 1;
  padding: 2px;
}
.menu {
  font-size: 32px;
  cursor: pointer;
  z-index: 1;
  margin-right: 5px;
  color: #fff;
}
.menu:hover {
  transform: scale(1.09);
}

/* ===== MOBILE NAV ===== */
.mobile__nav {
  position: fixed;
  /* ✅ FIX: Start exactly at bottom of navbar (~52px), slide UP out of view when closed */
  top: 52px;
  left: 0;
  width: 100%;
  text-align: center;
  background: #f4f4f490;
  backdrop-filter: blur(4px);
  box-shadow: 0 0 30px #000;
  height: auto;
  max-height: calc(100vh - 52px);
  overflow-y: auto;
  padding: 10px 10px 16px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  /* ✅ FIX: Slide up OUT of view (negative = above navbar), slide down INTO view */
  transform: translateY(-110%);
  transition: transform 0.4s ease-in;
  /* ✅ FIX: z-index below navbar (3) so navbar always stays on top */
  z-index: 2;
}
.mobile__nav.isactive {
  /* ✅ Slides to exactly below navbar — translateY(0) because top:52px already positions it */
  transform: translateY(0);
  transition: transform 0.35s ease-out;
}

/* ✅ FIX: Tighter link margins so all items fit regardless of how many there are */
.mobile__a {
  cursor: pointer;
  background: #0a3d62;
  color: #fff;
  padding: 11px 20px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  /* ✅ Changed from margin: 40px 10px — was pushing items out of container */
  margin: 6px 10px;
  display: block;
  transition: all ease-in-out 0.3s;
}
.mobile__a:hover {
  background: #d0e7ff;
  color: #000;
  transition: all ease-in-out 0.3s;
}

/* ✅ FIX: Style the logout link distinctly in mobile nav too */
.mobile__a.logout {
  background: rgba(231,76,60,0.15);
  color: #ff6b6b;
  border: 1px solid rgba(231,76,60,0.35);
}
.mobile__a.logout:hover {
  background: #e74c3c;
  color: #fff;
}

/* ===== TYPOGRAPHY ===== */
.h1 {
  font-size: 1.8rem;
  margin-bottom: 50px;
}
.h2 {
  font-size: 1.6rem;
  margin-bottom: 20px;
  text-align: center;
  border-radius: 4px;
  display: inline-block;
}
p {
  font-size: 1rem;
}
.a {
  text-decoration: none;
  color: #fff;
}
.ul {
  list-style: none;
  padding: 0;
}

/* ===== BUTTONS ===== */
.btn {
  cursor: pointer;
  background: #ffc312;
  color: #000;
  padding: 10px 20px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  margin: 10px;
  margin-top: 20px;
  transition: all ease-in-out 0.3s;
  border: none;
  display: inline-block;
}
.btn:hover {
  background: #e6ac00;
  color: white;
  transition: all ease-in-out 0.3s;
}
.btn__outline {
  cursor: pointer;
  background: transparent;
  color: #fff;
  border: 2px solid #fff;
  padding: 10px 20px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  transition: all ease-in-out 0.3s;
  display: inline-block;
}
.btn__outline:hover {
  background: #fff;
  color: #0a3d62;
}
.form__btn {
  cursor: pointer;
  background: #ffc312;
  color: #000;
  padding: 7px 20px;
  border-radius: 4px;
  text-decoration: none;
  font-size: 1rem;
  margin: 9px 0 0 0;
  transition: all ease-in-out 0.4s;
  border: none;
}
.form__btn:hover {
  background: #e6ac00;
}
.form__btn-switch {
  border: none;
  margin-left: 7px;
  font-size: 1rem;
  box-shadow: 0 0 30px #000000;
  cursor: pointer;
  border-radius: 4px;
  background: #fff;
  padding: 4px 10px;
}

/* ===== WHATSAPP BUTTON ===== */
.whatsapp__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #25D366;
  color: #fff;
  padding: 12px 24px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1rem;
  margin: 10px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(37,211,102,0.4);
}
.whatsapp__btn:hover {
  background: #128C7E;
  transform: translateY(-2px);
}

/* ===== OVERLAY ===== */
.overlay {
  position: fixed;
  inset: 0;
  background: #00000060;
  z-index: 5;
  display: none;
}
.overlay.isactive {
  display: block;
}

/* ===== GENERAL POPUP (reusable) ===== */
.popup {
  text-align: center;
  position: fixed;
  top: 50%;
  transform: translate(-50%, -50%);
  left: 50%;
  background: #0a3d62;
  color: #fff;
  width: 90%;
  max-width: 350px;
  height: auto;
  border-radius: 12px;
  padding: 20px;
  display: none;
  z-index: 6;
}
.popup.isactive {
  display: block;
}
.popup__close {
  cursor: pointer;
  position: absolute;
  right: 8px;
  top: 0;
  font-size: 2.2rem;
  transition: all ease-in-out 0.3s;
  color: #fff;
  background: none;
  border: none;
}
.popup__close:hover {
  transform: scale(1.09);
}
.popup__btn {
  cursor: pointer;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  padding: 6px 16px;
  background: #ffc312;
  color: #000;
  font-weight: 700;
  transition: all ease-in-out 0.3s;
  font-family: inherit;
}
.popup__btn:hover {
  background: #e6ac00;
}
.p__popup {
  font-size: 1rem;
  margin-bottom: 14px;
  padding: 0 10px;
  line-height: 1.5;
}

/* ===== AUTH FORM (signup/signin popup) ===== */
.form__container {
  position: fixed;
  top: 52px;                /* sit just below navbar, not centered */
  left: 50%;
  transform: translateX(-50%);  /* only center horizontally */
  transition: all ease 2s;
  display: none;
  width: 90%;
  max-width: 500px;
  max-height: calc(100vh - 72px); /* full remaining height minus navbar */
  overflow: hidden;

  color: #fff;
  z-index: 6;
}

.form__container.isactive {
  display: block;
}
.form__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0 15px;
}
.form__close {
  color: #fff;
  font-size: 3rem;
  cursor: pointer;
  padding: 2px 10px;
}
/* signup and signin holders — no slide animation, just instant swap */
.signup__holder {
  position: relative;       /* no longer absolute — stacks normally */
  background-color: #0a3d62;
  width: 100%;
  border-radius: 20px;
  overflow-y: auto;
  max-height: calc(100vh - 72px);
  display: block;
}
.signup__holder.isactive {
  display: none;   /* hidden when isactive */
}
.signup__form {
  width: 97%;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-left: 2px;
}
.signin__holder {
  position: relative;       /* no longer absolute */
  background-color: #0a3d62;
  width: 100%;
  border-radius: 20px;
  overflow-y: auto;
  max-height: calc(100vh - 72px);
  display: none;
}
.signin__holder.isactive {
  display: block;  /* visible when isactive */
}
.signin__form {
  width: 97%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-left: 2px;
}
.input__holder {
  width: 100%;
  max-width: 470px;
  margin: 3px 0;
  margin-left: 3px;
}

/* .input scoped to auth forms only — does NOT affect booking.php inputs */
.signup__form .input,
.signin__form .input {
  width: 100%;
  border: none;
  background: #ffffff30;
  box-shadow: 0 0 30px #00000080;
  transition: all ease-out 0.3s;
  padding: 4px 2px;
  color: #fff;
  border-radius: 3px;
}
@media (hover: hover) and (pointer: fine) {
  .signup__form .input:hover,
  .signin__form .input:hover {
    padding: 10px 0;
    font-size: 1.1rem;
    transition: all ease-in 0.3s;
  }
}
@media (hover: none) and (pointer: coarse) {
  .signup__form .input:focus,
  .signin__form .input:focus {
    padding: 10px 0;
    font-size: 1.1rem;
    transition: all ease-in 0.3s;
  }
}

/* Base .input for any context outside auth (safe neutral reset) */
.input {
  width: 100%;
  border-radius: 3px;
  transition: all ease-out 0.3s;
}
.error {
  font-size: 12px;
  margin: 0;
  padding: 0;
  color: #ff4d4d;
}
::placeholder {
  color: #d0dce7;
  font-size: 14px;
  font-weight: 400;
}

/* ===== LIGHTBOX ===== */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.88);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.25s ease;
}
.lightbox img {
  max-width: 88vw;
  max-height: 88vh;
  border-radius: 50%;
  box-shadow: 0 0 60px rgba(0,0,0,0.6);
  cursor: default;
  object-fit: cover;
}
.lightbox__close {
  position: fixed;
  top: 16px;
  right: 20px;
  background: rgba(255,255,255,0.2);
  border: none;
  color: #fff;
  font-size: 2rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  z-index: 100000;
  line-height: 1;
}
.lightbox__close:hover {
  background: rgba(255,255,255,0.35);
}

/* ===== TERMS MODAL ===== */
.terms__modal {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.terms__modal.isactive {
  opacity: 1;
  pointer-events: all;
}
.terms__modal-box {
  background: #fff;
  border-radius: 16px;
  width: 100%;
  max-width: 560px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0,0,0,0.35);
  overflow: hidden;
}
.terms__modal-header {
  background: #0a3d62;
  color: #fff;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}
.terms__modal-header h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
}
.terms__modal-close {
  background: none;
  border: none;
  color: #fff;
  font-size: 1.8rem;
  cursor: pointer;
  line-height: 1;
  padding: 0 4px;
}
.terms__modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  font-size: 0.85rem;
  color: #444;
  line-height: 1.7;
}
.terms__modal-body h4 {
  color: #0a3d62;
  font-size: 0.9rem;
  font-weight: 800;
  margin: 18px 0 6px;
}
.terms__modal-body h4:first-child { margin-top: 0; }
.terms__modal-body p { margin: 0 0 8px; }
.terms__modal-footer {
  padding: 14px 20px;
  border-top: 1px solid #f0f0f0;
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}
.terms__modal-footer button {
  flex: 1;
  padding: 12px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  font-family: inherit;
  transition: background 0.2s;
}
.terms__accept-btn {
  background: #ffc312;
  color: #000;
}
.terms__accept-btn:hover { background: #e6ac00; }
.terms__decline-btn {
  background: #f0f0f0;
  color: #666;
}
.terms__decline-btn:hover { background: #e0e0e0; }

/* ===== AGREEMENT CHECKBOX ===== */
.terms__check-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 8px 3px 4px;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.85);
  line-height: 1.5;
}
.terms__check-row input[type="checkbox"] {
  margin-top: 2px;
  flex-shrink: 0;
  width: 15px;
  height: 15px;
  cursor: pointer;
  accent-color: #ffc312;
}
.terms__check-row a {
  color: #ffc312;
  text-decoration: underline;
  cursor: pointer;
}
.terms__check-error {
  font-size: 0.78rem;
  color: #ff6b6b;
  margin: 0 3px 4px;
  display: none;
}
.terms__check-error.visible { display: block; }

/* ===== FOOTER ===== */
.footer {
  background: #0a3d62;
  color: white;
  text-align: center;
  font-size: 14px;
  padding: 20px 10px;
}
.footer a {
  color: #ffc312;
  text-decoration: none;
}
.footer a:hover {
  text-decoration: underline;
}

/* ===== SHARED MEDIA QUERIES ===== */
@media screen and (min-width: 590px) {
  .h1 { font-size: 2.4rem; }
  p   { font-size: 1.2rem; }
  .btn { padding: 15px 25px; font-size: large; }
  .h2 { font-size: 2rem; }
}
@media screen and (min-width: 680px) {
  .mobile__nav {
    width: 50%;
    right: 0;
    left: auto;
    max-width: 444px;
  }
}
@media screen and (min-width: 1024px) {
  .menu { display: none; }
  .mobile__nav { display: none; }
  .nav__ul {
    display: flex;
    list-style: none;
  }
  .nav__a {
    text-decoration: none;
    color: #fff;
    margin: 0 6px;
    font-size: 1rem;
    padding: 5px 10px;
    transition: all ease-in-out 0.3s;
    border-radius: 5px;
  }
  .nav__a:hover {
    background: #d0e7ff;
    color: #0a3d62;
  }
  .nav__logout {
    background: rgba(231,76,60,0.25);
    color: #ff8a80 !important;
    border: 1px solid rgba(231,76,60,0.4);
    border-radius: 5px;
  }
  .nav__logout:hover {
    background: #e74c3c !important;
    color: #fff !important;
  }
  .nav__cta {
    cursor: pointer;
    border: solid 2px #fff;
    border-radius: 4px;
    padding: 5px 15px;
    font-size: 1rem;
    color: #fff;
    margin: 0 6px;
    text-decoration: none;
    transition: all ease-in-out 0.3s;
  }
  .nav__cta:hover {
    color: #000;
    background: #fff;
  }
  .h1 { font-size: 3rem; margin-top: 100px; }
  p   { font-size: 1.6rem; }
  .h2 { font-size: 2.3rem; margin-bottom: 30px; margin-top: 80px; }
  .btn { font-size: 1.3rem; padding: 15px 30px; }
}