/* ApnaSociety theme */
:root {
    --brand: #1a9e5c;
    --brand-dark: #137a47;
    --brand-soft: #e7f6ee;
    --navy: #0f2540;
    --ink: #1f2d3d;
    --muted: #64748b;
    --line: #e5eaf0;
    --bg: #f6f9f7;
    --bs-body-font-family: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --bs-body-color: var(--ink);
    --bs-success: var(--brand);
    --bs-success-rgb: 26, 158, 92;
    --bs-link-color: var(--brand-dark);
    --bs-link-hover-color: var(--brand);
    --bs-border-radius: .75rem;
    --bs-border-radius-lg: 1rem;
}
html { scroll-behavior: smooth; }
body { background: #fff; font-family: var(--bs-body-font-family); }
a { text-decoration: none; }
.text-brand { color: var(--brand) !important; }
.text-navy { color: var(--navy) !important; }

/* Buttons */
.btn { border-radius: .8rem; font-weight: 500; }
.btn-brand, .btn-success { --bs-btn-bg: var(--brand); --bs-btn-border-color: var(--brand); --bs-btn-color: #fff; --bs-btn-hover-bg: var(--brand-dark); --bs-btn-hover-border-color: var(--brand-dark); --bs-btn-hover-color: #fff;
    --bs-btn-active-bg: var(--brand-dark); --bs-btn-active-border-color: var(--brand-dark); --bs-btn-disabled-bg: var(--brand); --bs-btn-disabled-border-color: var(--brand); }
.btn-brand { padding: .6rem 1.4rem; box-shadow: 0 6px 16px rgba(26,158,92,.25); }
.btn-outline-brand { --bs-btn-color: var(--navy); --bs-btn-border-color: var(--line); --bs-btn-bg: #fff; --bs-btn-hover-bg: var(--brand-soft); --bs-btn-hover-border-color: var(--brand);
    --bs-btn-hover-color: var(--brand-dark); --bs-btn-active-bg: var(--brand-soft); --bs-btn-active-color: var(--brand-dark); --bs-btn-active-border-color: var(--brand); padding: .55rem 1.3rem; box-shadow: 0 2px 8px rgba(15,37,64,.06); }
.form-control, .form-select { border-color: var(--line); border-radius: .75rem; }
.form-control:focus, .form-select:focus { border-color: var(--brand); box-shadow: 0 0 0 .2rem rgba(26,158,92,.15); }
.card { border-color: var(--line); border-radius: 1rem; }
.modal-content { border: 0; border-radius: 1.1rem; }
.nav-tabs .nav-link.active { color: var(--brand-dark); border-bottom-color: var(--brand); font-weight: 600; }
.nav-tabs .nav-link { color: var(--muted); }
.badge.text-bg-success { background: var(--brand) !important; }

/* Top navigation */
.site-nav { background: #fff; box-shadow: 0 2px 14px rgba(15,37,64,.07); padding: .75rem 0; position: sticky; top: 0; z-index: 1030; }
.brand { display: flex; align-items: center; gap: .65rem; padding: 0; }
.brand-mark { width: 52px; height: 46px; flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-name { font-size: 1.85rem; font-weight: 600; letter-spacing: -.5px; }
.brand-name .a { color: var(--navy); }
.brand-name .s { color: var(--brand); }
.brand-text small { font-size: .56rem; color: var(--navy); letter-spacing: .1px; margin-top: .2rem; font-weight: 500; }
.site-links .nav-link { color: var(--navy); font-weight: 500; padding: .5rem 1rem !important; position: relative; }
.site-links .nav-link:hover, .site-links .nav-link.active { color: var(--brand-dark); }
.site-links .nav-link.active::after { content: ''; position: absolute; left: 1rem; right: 1rem; bottom: -.1rem; height: 3px; border-radius: 3px; background: var(--brand); }
.icon-btn { width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; color: var(--navy); font-size: 1.15rem; border-radius: 50%; }
.icon-btn:hover { background: var(--brand-soft); color: var(--brand-dark); }
@media (max-width: 991.98px) {
    .site-links { padding: .75rem 0; }
    .site-links .nav-link.active::after { left: 0; right: auto; width: 28px; bottom: 0; }
    .nav-actions { padding-bottom: .5rem; flex-wrap: wrap; }
    .brand-text small { display: none; }
    .brand-name { font-size: 1.5rem; }
}

/* Hero */
.hero { background: linear-gradient(100deg, #f3f8f5 0%, #f3f8f5 45%, #eaf3ee 100%); position: relative; overflow: hidden; }
.hero-inner { position: relative; z-index: 2; padding-top: 3.5rem; padding-bottom: 3rem; }
.hero-pill { display: inline-flex; align-items: center; gap: .5rem; background: var(--brand); color: #fff; font-weight: 500; font-size: .9rem; padding: .5rem 1.1rem; border-radius: 999px; }
.hero h1 { color: var(--navy); font-weight: 700; font-size: clamp(2rem, 4.2vw, 3.1rem); line-height: 1.15; letter-spacing: -.8px; margin: 1.4rem 0 1rem; }
.hero .lead { color: #44546a; font-size: 1.05rem; max-width: 34rem; }
.hero-search { background: #fff; border-radius: 1rem; box-shadow: 0 12px 34px rgba(15,37,64,.12); padding: .55rem; display: flex; gap: .5rem; align-items: center; max-width: 38rem; margin-top: 1.6rem; }
.hero-search .field { display: flex; align-items: center; gap: .6rem; padding: 0 .9rem; flex: 1 1 auto; min-width: 0; color: var(--muted); }
.hero-search input, .hero-search select { border: 0; outline: 0; background: transparent; width: 100%; padding: .7rem 0; color: var(--ink); font-size: .95rem; }
.hero-search .society-field { flex: 0 0 13rem; border-left: 1px solid var(--line); }
.hero-search .btn { padding: .8rem 1.8rem; }
.hero-points { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; margin-top: 2rem; max-width: 38rem; }
.hero-point { display: flex; gap: .65rem; align-items: flex-start; }
.hero-point .ico { flex: none; width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; background: #fff; box-shadow: 0 4px 12px rgba(15,37,64,.08); }
.hero-point b { display: block; font-size: .85rem; color: var(--navy); line-height: 1.25; }
.hero-point span { display: block; font-size: .75rem; color: var(--muted); line-height: 1.35; margin-top: .15rem; }

/* Hero artwork (right side). Drop public/images/hero.jpg to use a real photo. */
.hero-art { position: absolute; top: 0; right: 0; bottom: 0; width: 52%; z-index: 1;
    background: linear-gradient(180deg, #cfe8f5 0%, #e5f3ea 55%, #bfe0c9 100%); }
.hero-art.has-photo { background-size: cover; background-position: center right; }
.hero-art::before { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, #f3f8f5 0%, rgba(243,248,245,.85) 18%, rgba(243,248,245,0) 48%); z-index: 2; }
.skyline { position: absolute; left: 0; bottom: 0; width: 100%; height: 78%; z-index: 1; opacity: .9; }
.hero-tagline { position: absolute; left: 17%; bottom: 6%; z-index: 3; font-family: 'Caveat', cursive; font-size: 2.1rem; line-height: 1.05; color: var(--navy); transform: rotate(-6deg); text-shadow: 0 1px 8px rgba(255,255,255,.8); }
.hero-tagline i { color: #e11d48; font-size: 1.2rem; }
.fcard { position: absolute; z-index: 4; width: 168px; background: #fff; border-radius: 1rem; padding: .45rem; box-shadow: 0 10px 28px rgba(15,37,64,.18); display: block; color: var(--navy); }
.fcard .pic { height: 78px; border-radius: .7rem; display: flex; align-items: center; justify-content: center; font-size: 2.5rem; color: #fff; background-size: cover; background-position: center; }
.fcard .lab { display: flex; align-items: center; gap: .4rem; font-size: .72rem; font-weight: 600; padding: .45rem .3rem .2rem; line-height: 1.2; }
.fcard .lab i { font-size: .95rem; }
.fcard:hover { color: var(--brand-dark); transform: translateY(-2px); }
.fc1 { top: 14%; left: 22%; } .fc2 { top: 41%; left: 14%; } .fc3 { top: 13%; right: 6%; }
.fc4 { top: 37%; right: 2%; width: 160px; } .fc5 { top: 66%; right: 5%; }
.g-food { background-image: linear-gradient(135deg, #f59e0b, #f97316); } .g-fashion { background-image: linear-gradient(135deg, #8b5cf6, #ec4899); }
.g-plumb { background-image: linear-gradient(135deg, #2563eb, #38bdf8); } .g-tutor { background-image: linear-gradient(135deg, #0d9488, #34d399); }
.g-plant { background-image: linear-gradient(135deg, #16a34a, #86efac); }
@media (max-width: 1199.98px) { .fcard { width: 148px; } .fcard .pic { height: 64px; font-size: 2rem; } .fc1 { left: 16%; } .fc2 { left: 8%; } }
@media (max-width: 991.98px) {
    .hero-art { display: none; }
    .hero-inner { padding-top: 2.2rem; padding-bottom: 2rem; }
    .hero-points { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .hero-mobile-cards { display: grid !important; }
}
@media (max-width: 575.98px) {
    .hero-search { flex-wrap: wrap; }
    .hero-search .field { flex: 1 1 100%; padding: 0 .6rem; }
    .hero-search .society-field { flex: 1 1 100%; border-left: 0; border-top: 1px solid var(--line); }
    .hero-search .btn { width: 100%; }
}
.hero-mobile-cards { display: none; grid-template-columns: repeat(2, 1fr); gap: .75rem; margin-top: 1.6rem; }
.hero-mobile-cards .fcard { position: static; width: auto; }
.hero-mobile-cards .fcard:nth-child(5) { display: none; }

/* Sections */
.section { padding: 3rem 0; }
.section-title { text-align: center; color: var(--navy); font-weight: 700; font-size: 1.6rem; margin-bottom: .35rem; }
.section-sub { text-align: center; color: var(--muted); margin-bottom: 2rem; }
.cat-row { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.cat-item { width: 120px; text-align: center; color: var(--navy); font-size: .85rem; font-weight: 500; }
.cat-item .tile { width: 64px; height: 64px; margin: 0 auto .7rem; border-radius: 1.1rem; display: flex; align-items: center; justify-content: center; font-size: 1.8rem; transition: transform .15s; }
.cat-item:hover { color: var(--brand-dark); } .cat-item:hover .tile { transform: translateY(-3px); }
.t-orange { background: #ffeadc; color: #f97316; } .t-green { background: #dcf5e6; color: #16a34a; } .t-purple { background: #ece6ff; color: #7c3aed; }
.t-pink { background: #ffe3ec; color: #e11d48; } .t-blue { background: #e0ecff; color: #2563eb; } .t-amber { background: #fff1cc; color: #d97706; }
.t-teal { background: #d9f5f0; color: #0d9488; } .t-gray { background: #eceff3; color: #64748b; }
@media (max-width: 575.98px) { .cat-row { flex-wrap: nowrap; overflow-x: auto; justify-content: flex-start; padding-bottom: .5rem; scrollbar-width: none; } .cat-item { flex: none; width: 96px; } }

.listing-card { transition: box-shadow .15s, transform .15s; overflow: hidden; border: 1px solid var(--line); }
.listing-card:hover { box-shadow: 0 12px 28px rgba(15,37,64,.12); transform: translateY(-2px); }
.listing-card img, .thumb { object-fit: cover; width: 100%; height: 180px; background: #e9eef2; }
.thumb { display: flex; align-items: center; justify-content: center; color: var(--muted); }
.gallery img { max-height: 380px; width: 100%; object-fit: contain; background: #fff; }
.page-head { background: linear-gradient(100deg, #f3f8f5, #eaf3ee); padding: 2rem 0 1.5rem; margin-bottom: 1.5rem; }
.page-head h1 { color: var(--navy); font-weight: 700; font-size: 1.7rem; margin: 0; }
.filter-card { background: #fff; border-radius: 1rem; box-shadow: 0 8px 24px rgba(15,37,64,.08); padding: 1rem; }
.steps .step { text-align: center; padding: 1rem; } .steps .num { width: 46px; height: 46px; border-radius: 50%; background: var(--brand-soft); color: var(--brand-dark); font-weight: 700; display: flex; align-items: center; justify-content: center; margin: 0 auto .8rem; }

/* Messaging, states */
.thread { max-height: 320px; overflow-y: auto; }
.bubble { max-width: 80%; padding: .5rem .75rem; border-radius: .9rem; margin-bottom: .5rem; white-space: pre-wrap; }
.bubble.mine { background: #d6f1e3; margin-left: auto; }
.bubble.theirs { background: #fff; border: 1px solid var(--line); }
.state { padding: 2.5rem 1rem; text-align: center; color: var(--muted); }
.auth-card { max-width: 440px; margin: 2rem auto; background: #fff; border-radius: 1.25rem; box-shadow: 0 16px 44px rgba(15,37,64,.12); padding: 2rem; }

/* Footer */
.site-footer { background: var(--bg); border-top: 1px solid var(--line); padding: 1.6rem 0; margin-top: 2rem; }
.site-footer a { color: var(--muted); } .site-footer a:hover { color: var(--brand-dark); }

/* Admin / dashboard pages keep the light grey canvas */
main.container { }

body:has(main.container) { background: var(--bg); }


/* ============ App-like experience (phones and tablets) ============ */
#navProgress { position: fixed; top: 0; left: 0; height: 3px; width: 0; background: var(--brand); z-index: 2000; opacity: 1; pointer-events: none; }
#navProgress.on { width: 85%; transition: width 6s cubic-bezier(.1, .7, .2, 1); }
#navProgress.done { width: 100%; opacity: 0; transition: width .15s, opacity .3s .15s; }
#app { animation: pageIn .2s ease-out; }
@keyframes pageIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { #app { animation: none; } }
html { -webkit-tap-highlight-color: transparent; }
button, .btn, a { touch-action: manipulation; }
.toasts-pos { bottom: 0; }

.bottom-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 1040; display: flex; justify-content: space-around; align-items: flex-end;
    background: #fff; border-top: 1px solid var(--line); box-shadow: 0 -6px 20px rgba(15,37,64,.08); padding: .35rem .25rem calc(.35rem + env(safe-area-inset-bottom)); }
.bottom-nav a { flex: 1 1 0; display: flex; flex-direction: column; align-items: center; gap: .1rem; padding: .3rem 0; color: var(--muted); font-size: .68rem; font-weight: 500; min-width: 0; }
.bottom-nav a i { font-size: 1.35rem; line-height: 1; }
.bottom-nav a.active { color: var(--brand-dark); }
.bottom-nav a.center i { width: 52px; height: 52px; margin-top: -26px; border-radius: 50%; background: var(--brand); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 1.6rem; box-shadow: 0 8px 18px rgba(26,158,92,.4); border: 4px solid #fff; box-sizing: content-box; width: 46px; height: 46px; }
.bottom-nav a.center { color: var(--brand-dark); }
@media (max-width: 991.98px) {
    body { padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
    .toasts-pos { bottom: calc(72px + env(safe-area-inset-bottom)); }
    .site-nav { padding: .5rem 0; }
    .site-footer { margin-bottom: 0; }
    .site-footer .small { display: none; }
    .container { padding-left: 1rem; padding-right: 1rem; }
    /* modals behave like full-screen app sheets on phones */
    .modal-dialog:not(.modal-dialog-centered) { margin: 0; max-width: none; min-height: 100%; display: flex; align-items: flex-end; }
    .modal-dialog .modal-content { border-radius: 1.25rem 1.25rem 0 0; width: 100%; max-height: 92vh; }
    .modal-dialog-scrollable .modal-content { max-height: 92vh; }
    .modal.fade .modal-dialog { transform: translateY(100%); transition: transform .25s ease-out; }
    .modal.show .modal-dialog { transform: none; }
    .nav-tabs { flex-wrap: nowrap; overflow-x: auto; white-space: nowrap; scrollbar-width: none; }
    .nav-tabs::-webkit-scrollbar { display: none; }
    .table-responsive { border-radius: 1rem; }
    .btn, .form-control, .form-select { min-height: 44px; }
    .filter-card { padding: .75rem; }
}
@media (min-width: 992px) { .bottom-nav { display: none !important; } }

/* Segmented control (Shop / Services / All) */
.segmented { display: inline-flex; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 3px; gap: 2px; }
.segmented a { padding: .4rem 1.1rem; border-radius: 999px; color: var(--muted); font-size: .88rem; font-weight: 500; }
.segmented a.on { background: var(--brand); color: #fff; box-shadow: 0 4px 10px rgba(26,158,92,.3); }

/* Listing page: sticky enquiry bar on phones */
.cta-bar { position: fixed; left: 0; right: 0; bottom: calc(66px + env(safe-area-inset-bottom)); z-index: 1035; background: #fff; border-top: 1px solid var(--line); padding: .6rem 1rem; display: flex; gap: .75rem; align-items: center; box-shadow: 0 -4px 14px rgba(15,37,64,.08); }
.cta-bar .price { font-weight: 700; color: var(--brand-dark); white-space: nowrap; }
@media (min-width: 992px) { .cta-bar { position: static; border: 0; box-shadow: none; padding: 0; } }
.list-row { display: flex; align-items: center; gap: .9rem; padding: .95rem 1rem; background: #fff; color: var(--ink); border-bottom: 1px solid var(--line); }
.list-row:first-child { border-radius: 1rem 1rem 0 0; } .list-row:last-child { border-radius: 0 0 1rem 1rem; border-bottom: 0; }
.list-row i.lead-i { font-size: 1.3rem; color: var(--brand-dark); width: 1.6rem; text-align: center; }
.list-row .chev { margin-left: auto; color: var(--muted); }
.list-row:hover { background: var(--brand-soft); color: var(--ink); }

/* ============ Login / Sign Up page ============ */
.auth-wrap { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); min-height: calc(100vh - 70px); }
.auth-art { position: relative; display: flex; flex-direction: column; background: linear-gradient(180deg, #d6ecff 0%, #e9f7ee 100%); overflow: hidden; }
.auth-copy { position: relative; z-index: 2; padding: 3rem 3rem 0 max(3rem, calc((100vw - 1320px) / 2 + 1rem)); max-width: 560px; margin-left: auto; margin-right: 0; width: 100%; }
.auth-pill { display: inline-flex; align-items: center; gap: .45rem; background: #fff; color: var(--brand-dark); font-weight: 600; font-size: .82rem; padding: .35rem .9rem; border-radius: 999px; box-shadow: 0 4px 12px rgba(15,37,64,.08); }
.auth-copy h2 { color: var(--navy); font-weight: 700; font-size: clamp(1.6rem, 2.6vw, 2.2rem); line-height: 1.2; letter-spacing: -.5px; margin: 1.1rem 0 .7rem; }
.auth-copy p { color: #44546a; max-width: 30rem; }
.auth-points { list-style: none; padding: 0; margin: 1.2rem 0 0; display: grid; gap: .55rem; }
.auth-points li { display: flex; align-items: center; gap: .6rem; font-size: .9rem; color: var(--navy); font-weight: 500; }
.auth-points i { width: 30px; height: 30px; flex: none; border-radius: 9px; background: #fff; color: var(--brand-dark); display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 3px 8px rgba(15,37,64,.08); }
.auth-scene { display: block; width: 100%; height: 100%; flex: 1 1 auto; min-height: 330px; margin-top: -10px; }
.auth-form { display: flex; align-items: center; justify-content: center; padding: 2.5rem 1.25rem; background: #fff; }
.auth-box { width: 100%; max-width: 420px; }
.auth-tabs { display: flex; width: 100%; margin-bottom: 1.6rem; }
.auth-tabs button { flex: 1; border: 0; background: transparent; padding: .55rem 1rem; border-radius: 999px; color: var(--muted); font-weight: 600; font-size: .92rem; }
.auth-tabs button.on { background: var(--brand); color: #fff; box-shadow: 0 4px 10px rgba(26,158,92,.3); }
.auth-box .form-control, .auth-box .input-group-text { padding-top: .7rem; padding-bottom: .7rem; }
@media (max-width: 991.98px) {
    .auth-wrap { grid-template-columns: 1fr; min-height: 0; }
    .auth-copy { display: none; }
    .auth-art { order: -1; }
    .auth-scene { min-height: 0; height: 190px; margin-top: 0; }
    .auth-form { padding: 1.5rem 1rem 2rem; align-items: flex-start; }
}

/* login page: panel fits the screen and the scene is always shown whole */
.auth-wrap { height: calc(100vh - 70px); min-height: 640px; }
.auth-art { background: #d6ecff; }
.auth-copy { padding-bottom: .5rem; }
.auth-scene { flex: 1 1 0; min-height: 0; height: auto; margin-top: 0; overflow: visible; }
.auth-assure { list-style: none; padding: 0; margin: 1.8rem 0 0; display: grid; gap: .6rem; }
.auth-assure li { display: flex; align-items: center; gap: .65rem; font-size: .85rem; color: #4a5a72; }
.auth-assure i { width: 30px; height: 30px; flex: none; border-radius: 9px; background: var(--brand-soft); color: var(--brand-dark); display: inline-flex; align-items: center; justify-content: center; }
@media (max-width: 991.98px) {
    .auth-wrap { height: auto; min-height: 0; }
    .auth-scene { flex: none; height: 200px; }
}
