/* ================================================================
   HOMEPLUMBER MASTER CSS
   Desktop: Full website with header/footer
   Mobile (<768px): App layout with bottom nav
   Fonts: DM Sans (body) + Nunito (display)
   ================================================================ */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:opsz,wght@9..40,300;9..40,400;9..40,500;9..40,600;9..40,700&family=Nunito:wght@600;700;800;900&display=swap');

:root {
  --blue:        #1565C0;
  --blue-mid:    #1976D2;
  --blue-light:  #42A5F5;
  --blue-pale:   #E3F2FD;
  --orange:      #F57C00;
  --orange-lt:   #FFF3E0;
  --green:       #2E7D32;
  --green-lt:    #E8F5E9;
  --red:         #C62828;
  --red-lt:      #FFEBEE;
  --grey-1:      #1a2540;
  --grey-2:      #374151;
  --grey-3:      #6B7280;
  --grey-4:      #9CA3AF;
  --grey-5:      #E5E7EB;
  --grey-6:      #F3F6FA;
  --white:       #FFFFFF;
  --shadow-sm:   0 2px 8px rgba(0,0,0,.07);
  --shadow:      0 4px 20px rgba(0,0,0,.10);
  --shadow-md:   0 8px 32px rgba(21,101,192,.15);
  --radius:      14px;
  --radius-sm:   8px;
  --header-h:    68px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  color: var(--grey-1);
  background: #f0f4f8;
  line-height: 1.6;
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
button { font-family: 'DM Sans', sans-serif; cursor: pointer; border: none; outline: none; }
input, select, textarea { font-family: 'DM Sans', sans-serif; }
h1, h2, h3, h4 { font-family: 'Nunito', sans-serif; }

/* ================================================================
   DESKTOP HEADER
   ================================================================ */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: #fff;
  border-bottom: 1.5px solid var(--grey-5);
  box-shadow: 0 2px 16px rgba(0,0,0,.08);
  height: var(--header-h);
}
.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 32px;
}
.header-spacer { height: var(--header-h); }

.header-logo { display: flex; align-items: center; gap: 10px; flex-shrink: 0; text-decoration: none; }
.logo-img { height: 46px; width: auto; max-width: 160px; border-radius: 0; object-fit: contain; }
.logo-fallback { display: flex; align-items: center; gap: 8px; }
.logo-icon-sq {
  width: 44px; height: 44px;
  background: linear-gradient(135deg, var(--blue), var(--blue-light));
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
}
.logo-text { font-family: 'Nunito', sans-serif; font-weight: 900; font-size: 1.05rem; color: var(--blue); line-height: 1.1; }
.logo-sub  { font-size: .65rem; color: var(--grey-4); }

.header-nav { display: flex; gap: 4px; flex: 1; justify-content: center; }
.header-nav a {
  padding: 8px 16px; font-size: .9rem; font-weight: 600;
  color: var(--grey-2); border-radius: 8px; transition: .2s; white-space: nowrap;
}
.header-nav a:hover { background: var(--blue-pale); color: var(--blue); }
.header-nav a.active { background: var(--blue-pale); color: var(--blue); font-weight: 700; }

.header-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.header-call-btn {
  display: flex; align-items: center; gap: 6px; padding: 8px 14px;
  background: var(--blue-pale); color: var(--blue); border-radius: 50px;
  font-size: .85rem; font-weight: 700; transition: .2s;
}
.header-call-btn:hover { background: var(--blue); color: #fff; }
.header-bookings-btn {
  display: flex; align-items: center; gap: 6px; padding: 8px 14px;
  border: 1.5px solid var(--grey-5); border-radius: 50px;
  font-size: .85rem; font-weight: 600; color: var(--grey-2); transition: .2s; position: relative;
}
.header-bookings-btn:hover { border-color: var(--blue); color: var(--blue); }
.header-badge {
  background: var(--orange); color: #fff; font-size: .65rem; font-weight: 800;
  padding: 1px 6px; border-radius: 20px; min-width: 18px; text-align: center;
}
.header-login-btn {
  padding: 8px 18px; border: 1.5px solid var(--grey-5); border-radius: 50px;
  font-size: .88rem; font-weight: 600; color: var(--grey-2); transition: .2s;
}
.header-login-btn:hover { border-color: var(--blue); color: var(--blue); }
.header-signup-btn {
  padding: 8px 18px;
  background: linear-gradient(135deg, var(--blue), var(--blue-mid));
  color: #fff; border-radius: 50px; font-size: .88rem; font-weight: 700;
  box-shadow: 0 3px 10px rgba(21,101,192,.3); transition: .2s;
}
.header-signup-btn:hover { opacity: .9; transform: translateY(-1px); }

.header-user-menu { position: relative; }
.header-user-btn {
  display: flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px;
  border: 1.5px solid var(--grey-5); border-radius: 50px; background: #fff;
  font-size: .88rem; font-weight: 600; color: var(--grey-1); cursor: pointer; transition: .2s;
}
.header-user-btn:hover { border-color: var(--blue); }
.header-avatar {
  width: 30px; height: 30px;
  background: linear-gradient(135deg, var(--blue), var(--blue-light));
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: .85rem; font-weight: 800; color: #fff;
  overflow: hidden;
}
.header-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.user-dropdown {
  display: none; position: absolute; top: calc(100% + 8px); right: 0;
  background: #fff; border: 1.5px solid var(--grey-5); border-radius: 14px;
  box-shadow: 0 12px 40px rgba(0,0,0,.12); min-width: 180px; padding: 8px; z-index: 200;
}
.user-dropdown.open { display: block; }
.user-dropdown a {
  display: flex; align-items: center; gap: 8px; padding: 9px 12px;
  font-size: .88rem; font-weight: 500; color: var(--grey-1); border-radius: 8px; transition: .15s;
}
.user-dropdown a:hover { background: var(--grey-6); }

.hamburger {
  display: none; flex-direction: column; gap: 5px; padding: 8px;
  background: none; border: none; cursor: pointer; margin-left: auto;
}
.hamburger span {
  display: block; width: 22px; height: 2px; background: var(--grey-1); border-radius: 2px; transition: .3s;
}
.mobile-menu {
  display: none; flex-direction: column; background: #fff;
  border-top: 1px solid var(--grey-5); padding: 12px 20px 16px; gap: 4px;
  box-shadow: 0 8px 24px rgba(0,0,0,.1);
}
.mobile-menu a {
  padding: 11px 12px; font-size: .92rem; font-weight: 600;
  color: var(--grey-1); border-radius: 8px; transition: .15s;
}
.mobile-menu a:hover { background: var(--blue-pale); color: var(--blue); }
.mobile-menu.open { display: flex; }

/* ================================================================
   DESKTOP FOOTER
   ================================================================ */
.site-footer {
  background: #0f172a;
  color: #94a3b8;
  padding: 56px 0 0;
  position: relative;
  z-index: 1;
  clear: both;
  margin-top: 0;
}
.footer-inner {
  max-width: 1280px; margin: 0 auto; padding: 0 32px 40px;
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 40px;
}
.footer-col h4 {
  font-family: 'Nunito', sans-serif; font-size: .88rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: 1px; color: #e2e8f0; margin-bottom: 16px;
}
.footer-col p { font-size: .85rem; line-height: 1.7; margin-top: 10px; }
.footer-logo { display: flex; align-items: center; gap: 8px; }
.footer-socials { display: flex; gap: 8px; margin-top: 16px; }
.footer-socials a {
  width: 36px; height: 36px; background: rgba(255,255,255,.08); border-radius: 8px;
  display: flex; align-items: center; justify-content: center; color: #94a3b8; transition: .2s;
}
.footer-socials a:hover { background: var(--blue); color: #fff; }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.footer-col ul li a { font-size: .85rem; color: #94a3b8; transition: .2s; display: flex; align-items: center; gap: 6px; }
.footer-col ul li a:hover { color: var(--blue-light); }
.footer-contact li { display: flex; align-items: flex-start; gap: 8px; font-size: .83rem; }
.footer-contact li svg { flex-shrink: 0; margin-top: 3px; color: var(--blue-light); }
.footer-contact li a:hover { color: var(--blue-light); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.08); padding: 18px 32px;
  max-width: 1280px; margin: 0 auto;
  display: flex; justify-content: space-between; align-items: center;
  font-size: .8rem; color: #475569; gap: 12px; flex-wrap: wrap;
}
.footer-bottom a { color: #64748b; transition: .2s; }
.footer-bottom a:hover { color: var(--blue-light); }

/* ================================================================
   PAGE STRUCTURE
   ================================================================ */
.page-wrapper { min-height: calc(100vh - var(--header-h)); background: #f0f4f8; }
.container { max-width: 1280px; margin: 0 auto; padding: 0 32px; }
.page-hero-banner {
  background: linear-gradient(135deg, #1565C0 0%, #1976D2 60%, #42A5F5 100%);
  padding: 48px 0; text-align: center; color: #fff; position: relative; overflow: hidden;
}
.page-hero-banner::before {
  content: ''; position: absolute; width: 300px; height: 300px;
  background: rgba(255,255,255,.06); border-radius: 50%; top: -100px; right: -80px;
}
.page-hero-banner h1 { font-size: 2rem; font-weight: 900; margin-bottom: 8px; }
.page-hero-banner p  { font-size: 1rem; opacity: .85; }

/* ================================================================
   MOBILE APP LAYOUT (≤768px)
   ================================================================ */
@media (max-width: 768px) {
  .site-header,
  .site-footer,
  .header-spacer { display: none !important; }

  body { background: #f0f4f8; }

  .app-wrapper {
    width: 100% !important;
    max-width: 100% !important;
    min-height: 100vh;
    background: #f0f4f8;
    box-shadow: none !important;
    border-radius: 0 !important;
    display: flex !important;
    flex-direction: column;
    overflow-x: hidden;
  }
  .page-wrapper { display: none; }
  .bottom-nav { display: flex !important; }
  .page-scroll {
    flex: 1;
    overflow-y: auto;
    padding-bottom: 80px;
    -webkit-overflow-scrolling: touch;
  }
  .page-scroll::-webkit-scrollbar { display: none; }

  .app-tabs {
    display: flex !important;
    margin: 10px 12px !important;
    padding: 4px !important;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 3px !important;
    flex-wrap: nowrap !important;
  }
  .app-tabs::-webkit-scrollbar { display: none; }
  .app-tab {
    flex-shrink: 0 !important;
    padding: 8px 14px !important;
    font-size: .78rem !important;
    white-space: nowrap;
  }
}

/* ================================================================
   DESKTOP LAYOUT (>768px)
   ================================================================ */
@media (min-width: 769px) {
  .site-header { display: flex !important; }
  .site-footer  { display: block !important; }
  .header-spacer { display: block !important; }

  .bottom-nav,
  .app-topbar,
  .service-banner { display: none !important; }
  .bottom-action-bar { display: none !important; }

  /* ─── KEY FIX: app-wrapper acts as normal div on desktop ─── */
  .app-wrapper {
    width: 100% !important;
    max-width: 100% !important;
    background: transparent !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    min-height: 0 !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
    overflow-x: visible !important;
    overflow-y: visible !important;
    display: block !important;
    flex-direction: unset !important;
    position: static !important;
    flex: none !important;
  }

  /* page-scroll = normal document flow on desktop */
  .page-scroll {
    overflow: visible !important;
    overflow-y: visible !important;
    max-height: none !important;
    height: auto !important;
    display: block !important;
    flex: none !important;
    padding-bottom: 0 !important;
  }

  /* Footer always after content, never overlapping */
  .hpc-footer,
  .site-footer {
    position: static !important;
    z-index: 1 !important;
    clear: both !important;
    display: block !important;
    margin-top: 0 !important;
  }

  .home-topbar { display: none !important; }

  /* HOME */
  .hero-slider { min-height: 360px !important; }
  .hero-slide { min-height: 360px !important; padding: 60px 80px !important; }
  .hero-slide-text h2 { font-size: 2.4rem !important; }
  .hero-slide-text p  { font-size: 1.05rem !important; margin-bottom: 24px !important; }
  /* Show the img on desktop inside the slider */
  .hero-slide-img { display:flex !important; width:240px !important; flex-shrink:0; align-items:center; justify-content:center; }
  .hero-slide-img img { width: 220px !important; height: 200px !important; object-fit:cover; border-radius:14px; }
  .section-label { padding: 24px 60px 12px !important; font-size: .9rem !important; }
  .categories-grid { grid-template-columns: repeat(6, 1fr) !important; padding: 0 60px 8px !important; gap: 20px !important; }
  .cat-icon-box { width: 88px !important; height: 88px !important; }
  .cat-name { font-size: .88rem !important; }
  .high-demand-scroll { display: grid !important; grid-template-columns: repeat(4, 1fr) !important; overflow: visible !important; padding: 0 60px 16px !important; gap: 20px !important; }
  .hd-item { width: auto !important; }
  .hd-item .hd-img, .hd-item .hd-img img { height: 130px !important; }
  .stats-bar   { margin: 0 60px !important; }
  .gallery-grid { grid-template-columns: repeat(6, 1fr) !important; padding: 0 60px 16px !important; }
  .special-offer { margin: 0 60px !important; }

  /* SERVICE DETAIL */
  .svc-grid { grid-template-columns: repeat(4, 1fr) !important; padding: 20px 60px !important; gap: 20px !important; }
  .svc-card-img { height: 160px !important; }
  .service-banner-img { height: 260px !important; border-radius: 0 !important; }
  .info-chips { padding: 14px 60px !important; gap: 12px !important; }

  /* PROFILE */
  .profile-hero { padding: 60px 80px 100px !important; }
  .wallet-rewards { padding: 0 60px !important; margin-top: -55px !important; }

  /* OLD BOOKING CARDS (non-bootstrap pages) */
  .app-tabs { margin: 16px 60px !important; flex-wrap: nowrap !important; overflow: visible !important; }
  .app-tab  { font-size: .88rem !important; padding: 10px 20px !important; }
  .booking-card { margin: 0 60px 16px !important; }

  /* SETTINGS / REFER */
  .settings-profile-card { padding: 28px 60px !important; }
  .refer-hero { padding: 48px 80px 60px !important; }
  .referral-code-box { margin: 20px 60px !important; }
  .earnings-card { margin: 0 60px 16px !important; }
  .app-card { margin-left: 60px !important; margin-right: 60px !important; }
  .app-alert { margin: 16px 60px !important; }
  .empty-state { padding: 60px 80px !important; }

  .hamburger { display: none !important; }
}

/* ================================================================
   DESKTOP 769–1024px ADJUSTMENTS
   ================================================================ */
@media (min-width: 769px) and (max-width: 1024px) {
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 28px; }
  .header-nav { gap: 2px; }
  .header-nav a { padding: 8px 10px; font-size: .84rem; }
  .categories-grid { grid-template-columns: repeat(6, 1fr) !important; gap: 12px !important; padding: 0 32px 8px !important; }
  .high-demand-scroll { padding: 0 32px 16px !important; }
  .svc-grid { grid-template-columns: repeat(3, 1fr) !important; padding: 20px 32px !important; }
  .booking-card { margin: 0 32px 16px !important; }
  .app-card { margin-left: 32px !important; margin-right: 32px !important; }
  .section-label { padding: 20px 32px 10px !important; }
}

/* ================================================================
   FOOTER RESPONSIVE
   ================================================================ */
@media (max-width: 1024px) {
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 28px; }
}
@media (max-width: 600px) {
  .footer-inner { grid-template-columns: 1fr; gap: 24px; }
}

/* ================================================================
   CATEGORY IMAGES
   ================================================================ */
.cat-icon-box {
  overflow: hidden !important;
  padding: 0 !important;
  background: transparent !important;
  border-radius: 16px;
}
.cat-icon-box img {
  width: 100% !important; height: 100% !important;
  object-fit: cover !important; border-radius: inherit; display: block;
}
.cat-icon-fallback {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem; background: #E3F2FD; border-radius: inherit;
}

/* ================================================================
   WHATSAPP FLOAT
   ================================================================ */
.wa-float {
  position: fixed; bottom: 28px; right: 28px;
  width: 56px; height: 56px; background: #25D366; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 20px rgba(37,211,102,.5); z-index: 500; transition: .3s;
  animation: waPulse 3s infinite;
}
.wa-float:hover { transform: scale(1.1); }
.wa-float svg { width: 28px; height: 28px; }
@keyframes waPulse {
  0%,100% { box-shadow: 0 4px 20px rgba(37,211,102,.5); }
  50%      { box-shadow: 0 4px 30px rgba(37,211,102,.8), 0 0 0 8px rgba(37,211,102,.15); }
}
@media (max-width: 768px) { .wa-float { display: none !important; } }

/* ================================================================
   UTILITIES
   ================================================================ */
/* ================================================================
   LAYOUT VISIBILITY UTILITIES — STRICT RULES
   ================================================================ */

/* Base: mobile-only NEVER shows on desktop */
.mobile-only          { display: none !important; }
.app-wrapper.mobile-only { display: none !important; }

/* Base: desktop-only shows on desktop */
.desktop-only         { display: block !important; }

/* Mobile (≤768px): flip them */
@media (max-width: 768px) {
  .mobile-only          { display: block !important; }
  .app-wrapper.mobile-only { display: flex !important; }
  .desktop-only         { display: none !important; }
}

/* Extra insurance — target any nested flex/grid inside mobile-only on desktop */
@media (min-width: 769px) {
  .mobile-only,
  .app-wrapper.mobile-only,
  .app-wrapper.mobile-only * { /* children also hidden — belt+suspenders */ }
  .mobile-only          { display: none !important; visibility: hidden !important; height: 0 !important; overflow: hidden !important; position: absolute !important; pointer-events: none !important; }
  .app-wrapper.mobile-only { display: none !important; visibility: hidden !important; height: 0 !important; overflow: hidden !important; position: absolute !important; pointer-events: none !important; }
}
.text-blue   { color: var(--blue); }
.text-orange { color: var(--orange); }
.fw-bold     { font-weight: 700; font-family: 'Nunito', sans-serif; }

/* ================================================================
   PAGE CONTENT WRAP (generic)
   ================================================================ */
@media (min-width: 769px) {
  .page-content-wrap {
    max-width: 1280px; margin: 0 auto; padding: 40px 40px 60px;
  }
  .two-col   { display: grid; grid-template-columns: 2fr 1fr; gap: 32px; align-items: start; }
  .three-col { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
}