/* ================================================================
   RentABoat — Global Header & Footer Stylesheet
   Folder: css/style.css
================================================================ */

/* ── Reset & Base ──────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --navy: #1D2BA7;
  --navy-hover: #101c76;
  --text-dark: #111827;
  --text-mid: #374151;
  --text-muted: #6B7280;
  --border: #D1D5DB;
  --border-light: #E5E7EB;
  --white: #ffffff;
  --font: 'Poppins', 'Segoe UI', Arial, sans-serif;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font);
  color: var(--text-dark);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

a {
  text-decoration: none;
  color: inherit;
}

button {
  font-family: var(--font);
  cursor: pointer;
}


/* ================================================================
   HEADER
================================================================ */
.rab-header {
  width: 100%;
  background: var(--white);
  border-bottom: 1px solid var(--border-light);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  height: 80px;
  display: flex;
  align-items: center;
  padding: 50px 32px;
  gap: 0;
  position: sticky;
  top: 0;
  /* needed for desktop dropdown */
  z-index: 100;
}


/* ── Logo ────────────────────────────────────────────────── */
.rab-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 1;
  min-width: 0;
}

.rab-logo__img {
  height: 40px;
  width: auto;
  display: block;
}


/* ── Search Bar ──────────────────────────────────────────── */
.rab-search {
  flex: 1;
  display: flex;
  justify-content: center;
  padding: 0 40px;
}

.rab-search__inner {
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 700px;
  height: 48px;
  border: 1.5px solid var(--border);
  border-radius: 50px;
  /* padding: right/top/bottom 5px — button border se touch na kare */
  padding: 5px 5px 5px 0;
  background: var(--white);
  transition: border-color 0.2s;
}

.rab-search__inner:focus-within {
  border-color: #9CA3AF;
}

.rab-search__input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  padding: 0 18px 0 20px;
  font-size: 0.92rem;
  color: var(--text-dark);
  min-width: 0;
  height: 100%;
  border-radius: 20px;
}

.rab-search__input::placeholder {
  color: #9CA3AF;
  font-size: 0.92rem;
}

.rab-search__btn {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 7px;
  background: var(--navy);
  color: var(--white);
  border: none;
  border-radius: 50px;
  padding: 0 20px;
  /* align-self: stretch — button padded area ko fill karega */
  align-self: stretch;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: background 0.2s;
  white-space: nowrap;
  cursor: pointer;
}

.rab-search__btn:hover {
  background: var(--navy-hover);
}

.rab-search__btn svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}


/* ── Header Nav (right side) ─────────────────────────────── */
.rab-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-shrink: 0;
  min-width: fit-content;
}

.rab-nav__link {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-dark);
  white-space: nowrap;
  transition: color 0.15s;
}

.rab-nav__link:hover {
  color: var(--navy);
}

/* Sign Up — outlined */
.rab-btn--outline {
  height: 38px;
  padding: 0 20px;
  border: 1.5px solid var(--navy);
  border-radius: 8px;
  background: var(--white);
  color: var(--navy);
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}

.rab-btn--outline:hover {
  background: var(--navy);
  color: var(--white);
}

/* Log In — filled */
.rab-btn--primary {
  height: 38px;
  padding: 0 20px;
  border: none;
  border-radius: 8px;
  background: var(--navy);
  color: var(--white);
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
  transition: background 0.15s;
}

.rab-btn--primary:hover {
  background: var(--navy-hover);
}


/* ── User Avatar Menu ────────────────────────────────────── */
.rab-user {
  position: relative;
}

.rab-user__trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: none;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--navy);
  cursor: pointer;
  padding: 6px 4px;
  user-select: none;
}

.rab-user__trigger:hover {
  opacity: 0.85;
}

.rab-user__avatar {
  width: 30px;
  height: 30px;
  color: var(--navy);
}

.rab-user__name {
  white-space: nowrap;
}

.rab-user__chevron {
  width: 14px;
  height: 14px;
  transition: transform 0.2s;
  color: var(--navy);
}

.rab-user__chevron.is-open {
  transform: rotate(180deg);
}

/* Dropdown panel */
.rab-dropdown {
  position: absolute;
  top: calc(100% + 20px);
  right: 0;
  background: var(--white);
  border: 1px solid var(--border-light);
  min-width: 230px;
  z-index: 999;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.rab-dropdown__item {
  display: block;
  padding: 15px 24px;
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--text-dark);
  border-bottom: 1px solid var(--border-light);
  transition: background 0.12s;
}

.rab-dropdown__item:last-child {
  border-bottom: none;
}

.rab-dropdown__item:hover {
  background: #F9FAFB;
}


/* ================================================================
   FOOTER
================================================================ */
.rab-footer {
  background: #FCFCFC;
}

/* ── Footer top links grid ───────────────────────────────── */
.rab-footer__links {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  padding: 52px 40px 44px;
}

.rab-footer__col-title {
  font-size: 0.8rem;
  font-weight: 800;
  color: #101c76;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 20px;
}

.rab-footer__col-links a {
  display: block;
  font-size: 0.938rem;
  font-weight: 400;
  color: #4B5563;
  margin-bottom: 14px;
  transition: color 0.15s;
}

.rab-footer__col-links a:hover {
  color: var(--navy);
}

.rab-footer__col-links a:last-child {
  margin-bottom: 0;
}

/* ── Footer brand + social row ───────────────────────────── */
.rab-footer__mid {
  padding: 28px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.rab-footer__brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.rab-footer__brand-img {
  height: 34px;
  width: auto;
  display: block;
}

.rab-footer__social {
  display: flex;
  align-items: center;
  gap: 10px;
}

.rab-footer__social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--white);
  transition: background 0.15s;
}

.rab-footer__social-link:hover {
  background: var(--navy-hover);
}

.rab-footer__social-link svg {
  width: 18px;
  height: 18px;
}

/* ── Footer copyright bar ────────────────────────────────── */
.rab-footer__copy {
  border-top: 1px solid var(--border-light);
  padding: 18px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.rab-footer__copy-text {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.rab-footer__legal {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.rab-footer__legal a {
  color: var(--text-muted);
  transition: color 0.15s;
}

.rab-footer__legal a:hover {
  color: var(--navy);
}

.rab-footer__legal-dot {
  color: var(--text-muted);
  font-size: 0.7rem;
}


/* ================================================================
   DEMO BAR (remove in production)
================================================================ */
.demo-bar {
  background: #EEF2FF;
  border-bottom: 1px solid #C7D2FE;
  padding: 10px 32px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--navy);
}

.demo-bar__label {
  font-weight: 400;
  opacity: 0.7;
}

.demo-btn {
  padding: 5px 14px;
  border-radius: 6px;
  border: 1.5px solid var(--navy);
  background: var(--white);
  color: var(--navy);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.demo-btn.is-active {
  background: var(--navy);
  color: var(--white);
}


/* ================================================================
   HAMBURGER BUTTON
================================================================ */
.rab-hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  flex-shrink: 0;
  color: var(--navy);
}

.rab-hamburger svg {
  display: block;
  width: 24px;
  height: 24px;
}


/* ================================================================
   MOBILE MENU
================================================================ */
.rab-mobile-menu {
  display: none;
  /* hidden by default on ALL screen sizes */
  width: 100%;
  background: var(--white);
  border-bottom: 1.5px solid var(--border-light);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.07);
}

/* Only show when hamburger clicked AND on mobile/tablet */
@media (max-width: 1023px) {
  .rab-mobile-menu.is-open {
    display: block;
  }
}

/* Each menu row */
.rab-mob-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 18px 24px;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-dark);
  border-bottom: 1px solid var(--border-light);
  background: none;
  border-left: none;
  border-right: none;
  border-top: none;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  font-family: var(--font);
}

.rab-mob-item:last-child {
  border-bottom: none;
}

/* Active/open accordion title becomes bold */
.rab-mob-item.is-open {
  font-weight: 700;
}

/* Chevron inside accordion button */
.rab-mob-chevron {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  transition: transform 0.2s;
  color: var(--text-dark);
}

.rab-mob-chevron.is-open {
  transform: rotate(180deg);
}

/* Sub-items (indented) */
.rab-mob-submenu {
  display: none;
}

.rab-mob-submenu.is-open {
  display: block;
}

.rab-mob-subitem {
  display: block;
  padding: 16px 24px 16px 48px;
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--text-dark);
  border-bottom: 1px solid var(--border-light);
  text-decoration: none;
}

.rab-mob-subitem:hover {
  background: #F9FAFB;
}

/* Sign Up + Log In buttons row */
.rab-mob-buttons {
  display: flex;
  gap: 12px;
  padding: 20px 24px;
  border-top: 1px solid var(--border-light);
}

.rab-mob-buttons .rab-btn--outline,
.rab-mob-buttons .rab-btn--primary {
  flex: 1;
  height: 44px;
  font-size: 0.95rem;
  border-radius: 10px;
}

/* Logged-in user row inside mobile menu */
.rab-mob-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 24px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--navy);
  border-bottom: 1px solid var(--border-light);
}

.rab-mob-user svg {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
}

.rab-mob-user span {
  flex: 1;
}

.rab-mob-user .rab-mob-chevron {
  color: var(--navy);
}


/* ================================================================
   FOOTER ACCORDION (mobile only — activated via JS)
================================================================ */
.rab-footer__acc-btn {
  display: none;
  /* shown only on mobile via JS/media */
  width: 100%;
  background: none;
  border: none;
  padding: 20px 20px;
  font-size: 0.8rem;
  font-weight: 700;
  color: #1B3A8C;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  text-align: left;
  cursor: pointer;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font);
  border-bottom: 1px solid var(--border-light);
}

.rab-footer__acc-btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  transition: transform 0.2s;
}

.rab-footer__acc-btn.is-open svg {
  transform: rotate(180deg);
}

.rab-footer__acc-content {
  display: block;
}

/* always visible on desktop */


/* ================================================================
   RESPONSIVE
================================================================ */

/* ── Tablet (hamburger kicks in) ─────────────────────────── */
@media (max-width: 1023px) {

  /* Show hamburger, hide desktop nav */
  .rab-hamburger {
    display: flex;
  }

  #nav-default,
  #nav-loggedin {
    display: none !important;
  }

  /* Search button: icon only — hide text */
  .rab-search-btn__text {
    display: none;
  }

  /* Search button becomes a circle */
  .rab-search__btn {
    padding: 0;
    width: 36px;
    justify-content: center;
  }

  .rab-header {
    padding: 0 20px;
  }

  /* 2d: 24px right padding between search bar and hamburger */
  .rab-search {
    padding: 0px 8px;
  }

  .rab-search__inner {
    width: 96%;
    max-width: 96%;
  }

  .rab-logo__img {
    height: 32px;
    max-width: 140px;
    object-fit: contain;
  }
}

/* ── Mobile ≤767px ───────────────────────────────────────── */
@media (max-width: 767px) {
  .rab-header {
    padding: 0 8px;
    height: 64px;
    gap: 8px;
  }

  /* Footer: switch to accordion */
  .rab-footer__links {
    display: block;
    padding: 0;
  }

  .rab-footer__col {
    border-bottom: 1px solid var(--border-light);
  }

  /* Hide static title — show accordion button instead */
  .rab-footer__col-title {
    display: none;
  }

  /* Show accordion button */
  .rab-footer__acc-btn {
    display: flex;
  }

  /* 3d: top padding 20px for acc-content */
  .rab-footer__acc-content {
    display: none;
    padding: 20px 20px 20px;
  }

  .rab-footer__acc-content.is-open {
    display: block;
  }

  /* 3e: margin-bottom 16px for footer links on mobile */
  .rab-footer__col-links a {
    margin-bottom: 16px;
  }

  /* Footer mid: centered on mobile */
  .rab-footer__mid {
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding: 32px 20px;
    border-top: none;
  }

  /* Social icons ABOVE logo on mobile */
  .rab-footer__mid {
    flex-direction: column-reverse;
  }

  /* Logo centered */
  .rab-footer__brand {
    justify-content: center;
  }

  /* Social centered */
  .rab-footer__social {
    justify-content: center;
  }

  /* Copyright bar: centered on mobile */
  .rab-footer__copy {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px;
    padding: 20px;
  }

  .rab-footer__copy-text {
    text-align: center;
  }
}

/* ── Small mobile ≤479px ─────────────────────────────────── */
@media (max-width: 479px) {

  /* Hide logo on smallest screens — give search more space */
  .rab-logo {
    display: none;
  }

  .rab-search {
    padding: 0;
    flex: 1;
  }

  .rab-search__inner {
    max-width: 100%;
  }

  /* Dropdown full stretch on mobile */
  .rab-dropdown {
    right: 0;
    left: auto;
    min-width: 200px;
  }
}

/* ── Mobile ≤320px ───────────────────────────────────────── */
@media (max-width: 320px) {
  .rab-header {
    padding: 0 4px;
    height: 64px;
    gap: 8px;
  }

  .rab-search__inner {
    width: 94%;
  }
}