/* =========================================
   GLOBAL STYLES
========================================= */

body {
    margin: 0;
    padding: 0;
    background: #f4f7fc;
    font-family: Arial, sans-serif;
    overflow-x: hidden;
}

.pincode-wrapper {
    max-width: 1400px;
    margin: auto;
    padding: 20px;
}


/* =========================================
   TOP NAVBAR
========================================= */

.custom-top-nav {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto 30px;
    padding: 18px 32px;
    background: #ffffff;
    border-radius: 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 10px 25px rgba(0,0,0,0.06);
    position: sticky;
    top: 12px;
    z-index: 9999;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: 800;
    color: #1d4ed8;
    white-space: nowrap;
}

.logo-icon img {
    width: 40px;
    height: 40px;
    display: block;
}

.logo-icon {
    display: inline-flex;
    align-items: center;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 28px;
    flex-wrap: wrap;
}

.nav-links a {
    text-decoration: none;
    color: #374151;
    font-size: 16px;
    font-weight: 600;
    padding: 8px 14px;
    border-radius: 10px;
    transition: all 0.25s ease;
}

.nav-links a:hover {
    background: #eff6ff;
    color: #2563eb;
}


/* =========================================
   HOMEPAGE SECTIONS
========================================= */

.homepage-section { padding: 30px 0; }

.section-inner {
    width: 92%;
    max-width: 1200px;
    margin: auto;
    overflow-x: clip;
}

.light-section  { background: #f8fafc; padding-top: 25px; padding-bottom: 25px; }
.white-section  { background: white;   padding-top: 25px; padding-bottom: 25px; }

.hero-section-wrap { padding-top: 20px; padding-bottom: 50px; }

#pincode-results { margin-top: 0; }


/* =========================================
   HERO SECTION
========================================= */

.hero-section {
    position: relative;
    width: 100%;
    margin: auto;
    padding: 90px 60px;
    border-radius: 36px;
    background: linear-gradient(135deg, #1d4ed8, #2563eb);
    color: white;
    text-align: center;
    overflow: hidden;
    box-shadow: 0 25px 60px rgba(37,99,235,0.22);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 1000px;
    margin: auto;
}

.hero-badge {
    display: inline-block;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.2);
    padding: 10px 18px;
    border-radius: 999px;
    margin-bottom: 24px;
    font-size: 14px;
    font-weight: 600;
}

.hero-title {
    font-size: 72px;
    font-weight: 800;
    line-height: 1.08;
    margin-bottom: 28px;
}

.hero-subtitle {
    font-size: 24px;
    line-height: 1.8;
    max-width: 850px;
    margin: auto;
    opacity: 0.95;
}


/* =========================================
   EXAMPLE TAGS
========================================= */

.hero-examples { margin-bottom: 30px; }

.example-tags {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 14px;
}

.example-tags span {
    background: rgba(255,255,255,0.15);
    padding: 10px 16px;
    border-radius: 999px;
    font-size: 14px;
}


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

.pincode-form {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 40px;
}

.search-wrapper {
    position: relative;
    width: 100%;
    max-width: 700px;
    z-index: 9999;
}

.pincode-form input {
    width: 100%;
    height: 68px;
    padding: 0 24px;
    border: none;
    border-radius: 18px;
    font-size: 20px;
    outline: none;
    box-sizing: border-box;
}

.pincode-form button {
    height: 68px;
    padding: 0 36px;
    border: none;
    border-radius: 18px;
    background: #111827;
    color: white;
    cursor: pointer;
    font-size: 18px;
    font-weight: 700;
    transition: 0.3s ease;
}

.pincode-form button:hover { background: #1f2937; }

.faq-link-wrap { margin-top: 18px; text-align: center; }

.faq-link {
    font-size: 16px;
    color: #e0f2fe;
    text-decoration: none;
    font-weight: 600;
    transition: 0.3s;
}

.faq-link:hover { text-decoration: underline; color: #ffffff; }


/* =========================================
   AUTOCOMPLETE
========================================= */

.autocomplete-results {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    width: 100%;
    background: white;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0,0,0,0.18);
    z-index: 99999;
    max-height: 320px;
    overflow-y: auto;
}

.autocomplete-item {
    padding: 14px;
    cursor: pointer;
    border-bottom: 1px solid #f1f1f1;
    color: #111827;
    background: #ffffff;
    font-size: 15px;
    line-height: 1.5;
}

.autocomplete-item:hover { background: #f3f4f6; }


/* =========================================
   SECTION HEADINGS
========================================= */

.section-heading { text-align: center; margin-bottom: 50px; }

.section-heading h2 {
    font-size: 48px;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 16px;
    line-height: 1.2;
}

.section-heading p {
    font-size: 21px;
    color: #64748b;
    max-width: 700px;
    margin: auto;
    line-height: 1.8;
}


/* =========================================
   TRUST STRIP  (single definition — duplicate removed)
========================================= */

.trust-strip-section { padding: 20px 0 10px; overflow: hidden; }

.trust-strip {
    width: 100%;
    overflow: hidden;
    background: #ffffff;
    border-radius: 14px;
    padding: 14px 0;
    box-shadow: 0 4px 18px rgba(0,0,0,0.04);
}

.trust-strip-track {
    display: flex;
    align-items: center;
    gap: 50px;
    width: max-content;
    white-space: nowrap;
    animation: trustScroll 40s linear infinite;
}

.trust-strip-track span {
    font-size: 17px;
    color: #334155;
    font-weight: 500;
    white-space: nowrap;
}

@keyframes trustScroll {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}


/* =========================================
   RESULT BOX
========================================= */

.result-box {
    background: white;
    padding: 30px;
    border-radius: 20px;
    margin: 30px 0;
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
}

.postal-note {
    background: #eff6ff;
    border-left: 4px solid #2563eb;
    border-radius: 10px;
    padding: 12px 16px;
    margin-bottom: 20px;
    font-size: 14px;
    color: #1e3a8a;
}


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

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.result-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.pincode-badge {
    background: #2f49d1;
    color: white;
    padding: 12px 18px;
    border-radius: 999px;
    font-size: 18px;
    font-weight: 700;
    display: inline-block;
    margin-bottom: 8px;
}

.location-subtitle {
    font-size: 15px;
    color: #475569;
    margin-top: 4px;
}


/* =========================================
   ACTION BUTTONS
========================================= */

.map-btn {
    display: inline-flex;
    align-items: center;
    background: #16a34a;
    color: white;
    padding: 10px 18px;
    border-radius: 12px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
    transition: 0.25s ease;
}

.map-btn:hover { background: #15803d; transform: translateY(-2px); }

/* NEW: Copy pincode button */
.copy-pin-btn {
    display: inline-flex;
    align-items: center;
    background: #f1f5f9;
    color: #334155;
    border: none;
    padding: 10px 16px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.25s ease;
}

.copy-pin-btn:hover { background: #e2e8f0; }

/* NEW: WhatsApp share button */
.wa-share-btn {
    display: inline-flex;
    align-items: center;
    background: #25d366;
    color: white;
    padding: 10px 16px;
    border-radius: 12px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
    transition: 0.25s ease;
}

.wa-share-btn:hover { background: #1ebe57; transform: translateY(-2px); }


/* =========================================
   OFFICE LIST WITH BADGES  (NEW)
========================================= */

.office-list {
    margin: 16px 0;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
}

.office-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    border-bottom: 1px solid #f1f5f9;
    font-size: 14px;
}

.office-row:last-child { border-bottom: none; }

.office-name {
    color: #1e293b;
    font-weight: 500;
    flex: 1;
}

/* HO/SO/BO type badges */
.office-type-badge {
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 999px;
    letter-spacing: 0.5px;
    margin-left: 12px;
    flex-shrink: 0;
}

.badge-ho { background: #dbeafe; color: #1d4ed8; } /* blue  */
.badge-so { background: #dcfce7; color: #16a34a; } /* green */
.badge-bo { background: #fef3c7; color: #d97706; } /* amber */
.badge-po { background: #f1f5f9; color: #64748b; } /* grey for PO type */


/* =========================================
   RESULT GRID
========================================= */

.result-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.result-row {
    background: #f8fafc;
    border-radius: 10px;
    padding: 12px 16px;
}

.label {
    font-size: 12px;
    color: #64748b;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: block;
    margin-bottom: 4px;
}

.value {
    font-size: 15px;
    color: #1e293b;
    font-weight: 600;
}

.no-coords-note {
    color: #64748b;
    font-size: 14px;
    font-style: italic;
    margin: 12px 0;
}


/* =========================================
   AD SLOT
========================================= */

.ad-slot-inline {
    margin: 24px 0;
    padding: 20px;
    border-radius: 16px;
    background: #f8fafc;
    border: 2px dashed #d1d5db;
    text-align: center;
    font-size: 16px;
    font-weight: 700;
    color: #475569;
}

.sps-ad-slot {
    display: none;
    width: 100%;
    text-align: center;
    padding: 8px 0;
}

.sps-ad-slot.active {
    display: block;
}


/* =========================================
   FACILITY FILTERS  (single definition — duplicate removed)
========================================= */

.facility-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 22px;
    align-items: center;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.facility-tabs::-webkit-scrollbar {
    display: none;
}

.facility-filter {
    background: #f1f5f9;
    border: none;
    border-radius: 999px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 600;
    color: #334155;
    transition: 0.25s ease;
    cursor: pointer;
    display: inline-block;
    flex-shrink: 0;
}

.facility-filter.active { background: #1d4ed8; color: #ffffff; }
.facility-filter:hover   { background: #dbeafe; color: #1d4ed8; }


/* =========================================
   FACILITY GRID  (single definition — duplicate removed)
========================================= */

.facility-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 18px;
    margin-top: 20px;
}

.facility-card {
    background: white;
    padding: 18px;
    border-radius: 16px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.05);
    transition: 0.2s ease;
}

.facility-card:hover { transform: translateY(-2px); }

.facility-heading { font-size: 18px; margin-bottom: 14px; }

.facility-entry {
    padding: 10px 0;
    border-bottom: 1px solid #f1f5f9;
}

.facility-entry:last-child { border-bottom: none; }

.facility-name   { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.facility-distance { font-size: 13px; color: #64748b; margin-bottom: 6px; }

.facility-map {
    font-size: 13px;
    color: #2563eb;
    text-decoration: none;
    font-weight: 600;
}

.facility-section { margin-top: 24px; }
.facility-title   { font-size: 20px; font-weight: 700; margin-bottom: 16px; color: #0f172a; }


/* =========================================
   SKELETON LOADER  (NEW)
========================================= */

.sps-skeleton {
    background: white;
    padding: 30px;
    border-radius: 20px;
    margin: 30px 0;
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
}

.sps-skel-bar {
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 200% 100%;
    animation: spsShimmer 1.5s infinite;
    border-radius: 8px;
    height: 18px;
    margin-bottom: 12px;
}

.sps-skel-badge    { width: 160px; height: 36px; border-radius: 999px; }
.sps-skel-subtitle { width: 240px; height: 14px; margin-top: 8px; }
.sps-skel-title    { width: 180px; height: 22px; margin-bottom: 16px; }
.sps-skel-short    { width: 60%; }

.sps-skel-header    { margin-bottom: 24px; }
.sps-skel-grid      { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 24px; }
.sps-skel-facilities { margin-top: 8px; }

@keyframes spsShimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}


/* =========================================
   STATE → DIVISION DRILL-DOWN  (NEW)
========================================= */

.sps-drilldown {
    background: white;
    border-radius: 20px;
    padding: 28px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    margin: 30px 0;
    box-shadow: 0 8px 25px rgba(0,0,0,0.06);
    overflow: hidden;
}

.sps-drilldown h3 {
    font-size: 22px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 20px;
}

.sps-drilldown-row {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 20px;
    width: 100%;
}

.sps-drilldown select {
    flex: 1;
    min-width: 220px;
    max-width: 100%;
    width: 100%;
    height: 48px;
    padding: 0 12px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 15px;
    color: #1e293b;
    background: #f8fafc;
    cursor: pointer;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.sps-drilldown select:focus    { border-color: #2563eb; outline: none; }
.sps-drilldown select:disabled { opacity: 0.5; cursor: not-allowed; }

#sps-pincode-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.pincode-pill {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1d4ed8;
    padding: 8px 16px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.2s ease;
}

.pincode-pill:hover {
    background: #2563eb;
    color: white;
    border-color: #2563eb;
}


/* =========================================
   ABOUT / INFO BLOCKS
========================================= */

.info-block {
    background: #ffffff;
    border-radius: 24px;
    padding: 34px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.05);
    line-height: 1.9;
}

.info-block h2   { margin-top: 0; margin-bottom: 18px; font-size: 34px; color: #0f172a; }
.info-block p    { color: #475569; font-size: 17px; margin-bottom: 16px; }

/* =========================================
   POSTAL TYPE CARD GRID  (B10)
========================================= */

.postal-type-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.postal-type-card {
    background: #ffffff;
    border-radius: 20px;
    padding: 32px 28px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.05);
    border-top: 4px solid transparent;
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.postal-type-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.09);
}

.ptc-badge {
    display: inline-block;
    font-size: 22px;
    font-weight: 800;
    padding: 12px 22px;
    border-radius: 14px;
    letter-spacing: 1px;
    margin-bottom: 18px;
}

.ptc-ho { border-top-color: #1d4ed8; }
.ptc-ho .ptc-badge { background: #dbeafe; color: #1d4ed8; }

.ptc-so { border-top-color: #16a34a; }
.ptc-so .ptc-badge { background: #dcfce7; color: #16a34a; }

.ptc-bo { border-top-color: #d97706; }
.ptc-bo .ptc-badge { background: #fef3c7; color: #d97706; }

.ptc-title {
    font-size: 20px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 12px;
}

.ptc-desc {
    font-size: 15px;
    color: #64748b;
    line-height: 1.8;
    margin: 0;
}

.data-source-block {
    background: #ffffff;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.05);
}

.data-source-block h3 { margin-top: 0; margin-bottom: 18px; color: #0f172a; font-size: 28px; }
.data-source-block p  { font-size: 16px; color: #64748b; line-height: 1.9; margin-bottom: 14px; }


/* =========================================
   EXPLORE THIS AREA
========================================= */

.explore-area-section {
    margin-top: 28px;
    padding: 24px;
    background: linear-gradient(135deg, #ffffff, #f8fbff);
    border-radius: 22px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.05);
    border: 1px solid #eef2ff;
}

.explore-heading  { font-size: 30px; font-weight: 700; margin-bottom: 8px; color: #0f172a; }
.explore-subtitle { color: #64748b; font-size: 15px; margin-bottom: 22px; line-height: 1.7; }

.explore-tags { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.explore-tags a { display: inline-flex; }

.explore-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 18px;
    background: #ffffff;
    border: 1px solid #dbeafe;
    border-radius: 999px;
    text-decoration: none;
    color: #1e293b;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.25s ease;
    box-shadow: 0 4px 12px rgba(37,99,235,0.06);
}

.explore-tag:hover {
    transform: translateY(-3px);
    background: #eff6ff;
    border-color: #93c5fd;
    color: #1d4ed8;
    box-shadow: 0 10px 20px rgba(37,99,235,0.12);
}

.explore-tag::before { content: "📍"; font-size: 14px; }


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

.pro-footer {
    margin-top: 80px;
    padding: 40px 20px 20px;
    border-top: 1px solid #d6dbe5;
    background: #f8fafc;
}

.pro-footer-inner {
    max-width: 1200px;
    margin: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-links h4, .footer-contact h4 { margin: 0; font-size: 18px; color: #1e293b; }

.footer-links a {
    margin-left: 14px;
    text-decoration: none;
    color: #2563eb;
    transition: 0.3s ease;
}

.footer-links a:hover { color: #1d4ed8; text-decoration: underline; }
.footer-contact       { color: #475569; }

.footer-bottom {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #d6dbe5;
    text-align: center;
    color: #64748b;
    font-size: 15px;
}

.footer-title { font-weight: 700; margin-right: 10px; color: #0f172a; }


/* =========================================
   FACILITIES ASYNC SKELETON
========================================= */

.sps-fac-skeleton { padding: 4px 0 8px; }

.sps-fac-skel-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
}

.sps-fac-skel-card {
    background: #ffffff;
    border-radius: 14px;
    padding: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}


/* =========================================
   INLINE LEAFLET MAP  (B8 / B9)
========================================= */

.sps-map-wrap {
    margin: 20px 0 24px;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    box-shadow: 0 4px 16px rgba(0,0,0,0.07);
}

.sps-inline-map {
    width: 100%;
    height: 300px;
    background: #f1f5f9;
    display: block;
}

.sps-map-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    padding: 12px 16px;
    background: #f8fafc;
    border-top: 1px solid #e5e7eb;
}

.sps-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #374151;
    font-weight: 500;
}

.sps-legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
    display: inline-block;
}

/* B9 — category colours (matches SPS_MARKER_COLORS in app.js) */
.sps-dot-bank       { background: #1d4ed8; }
.sps-dot-hospital   { background: #dc2626; }
.sps-dot-school     { background: #16a34a; }
.sps-dot-postoffice { background: #7c3aed; }
.sps-dot-park       { background: #0d9488; }

.sps-map-actions {
    display: flex;
    gap: 10px;
    padding: 12px 16px;
    background: #f8fafc;
    border-top: 1px solid #e5e7eb;
}

.sps-map-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    background: #1d4ed8;
    color: #ffffff;
    border-radius: 10px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
    transition: background 0.2s ease;
}

.sps-map-action-btn:hover { background: #1e40af; color: #ffffff; }

/* Leaflet divIcon marker styles */
.sps-map-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.85);
    box-shadow: 0 1px 4px rgba(0,0,0,0.35);
}

.sps-map-pin {
    font-size: 24px;
    line-height: 1;
    filter: drop-shadow(0 1px 3px rgba(0,0,0,0.4));
}


/* =========================================
   NEARBY PINCODES  (K2)
========================================= */

.sps-nearby-pincodes {
    margin: 24px 0 20px;
}

.sps-nearby-title {
    font-size: 17px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 14px;
}

.sps-nearby-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.sps-nearby-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    color: #1e293b;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    line-height: 1;
}

.sps-nearby-pill:hover {
    background: #eff6ff;
    border-color: #93c5fd;
    color: #1d4ed8;
    transform: translateY(-1px);
}

.sps-nearby-dist {
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    background: #e2e8f0;
    padding: 2px 7px;
    border-radius: 999px;
}

.sps-nearby-pill:hover .sps-nearby-dist {
    background: #bfdbfe;
    color: #1d4ed8;
}


/* =========================================
   PLATFORM STATS STRIP  (C3)
========================================= */

.stats-strip {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    border-radius: 20px;
    padding: 32px 40px;
    box-shadow: 0 6px 24px rgba(0,0,0,0.05);
}

.stat-item {
    flex: 1;
    text-align: center;
    padding: 0 24px;
}

.stat-number {
    font-size: 42px;
    font-weight: 800;
    color: #1d4ed8;
    line-height: 1.1;
}

.stat-plus {
    font-size: 32px;
    color: #1d4ed8;
}

.stat-label {
    font-size: 16px;
    color: #64748b;
    font-weight: 600;
    margin-top: 6px;
}

.stat-divider {
    width: 1px;
    height: 60px;
    background: #e2e8f0;
    flex-shrink: 0;
}


/* =========================================
   TRENDING LOCALITIES  (C1 / C2)
========================================= */

/* default mobile */
.trending-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

/* tablet */
@media (min-width: 600px) {
    .trending-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* desktop */
@media (min-width: 1024px) {
    .trending-grid {
        grid-template-columns: 1fr 1fr 1fr;
    }
}

.trending-card {
    background: #ffffff;
    border-radius: 20px;
    padding: 26px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.05);
    border: 1px solid #f1f5f9;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.trending-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 32px rgba(37,99,235,0.10);
}

.trending-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.trending-pincode {
    font-size: 13px;
    font-weight: 700;
    color: #2563eb;
    background: #eff6ff;
    padding: 4px 12px;
    border-radius: 999px;
    letter-spacing: 0.5px;
}

.trending-state {
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.trending-name {
    font-size: 22px;
    font-weight: 800;
    color: #0f172a;
    margin: 0;
    line-height: 1.2;
}

.trending-char-tag {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    color: #475569;
    background: #f1f5f9;
    padding: 4px 12px;
    border-radius: 999px;
}

.trending-search-btn {
    margin-top: auto;
    background: none;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 700;
    color: #1d4ed8;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    width: 100%;
}

.trending-search-btn:hover {
    background: #eff6ff;
    border-color: #93c5fd;
}


/* Trending card upgrades */
.trending-desc {
    font-size: 12px;
    color: #64748b;
    line-height: 1.4;
    margin: 4px 0 8px;
}

.trending-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 6px;
}

.sps-loc-tag {
    font-size: 11px;
    padding: 3px 9px;
    border-radius: 10px;
    display: inline-block;
}

.sps-tag-residential  { background: #e1f5ee; color: #0f6e56; }
.sps-tag-commercial   { background: #e6f1fb; color: #185fa5; }
.sps-tag-heritage     { background: #faeeda; color: #854f0b; }
.sps-tag-agricultural { background: #e1f5ee; color: #0f6e56; }
.sps-tag-default      { background: #f1efe8; color: #5f5e5a; }
.sps-tag-score        { background: #eaf3de; color: #3b6d11; font-weight: 500; }


/* =========================================
   HOMEPAGE MAP PREVIEW  (C4)
========================================= */

.sps-homepage-map { height: 380px; }

.sps-map-tip-bar {
    padding: 12px 16px;
    background: #f8fafc;
    border-top: 1px solid #e5e7eb;
}

.sps-map-tip {
    font-size: 14px;
    color: #64748b;
    font-weight: 500;
}


/* =========================================
   QUICK TIPS ROW  (C5)
========================================= */

.quick-tips-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.quick-tip-card {
    background: #ffffff;
    border-radius: 20px;
    padding: 32px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.05);
    border: 1px solid #f1f5f9;
}

.tip-icon {
    font-size: 36px;
    margin-bottom: 16px;
    line-height: 1;
}

.tip-title {
    font-size: 22px;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 12px;
}

.tip-desc {
    font-size: 16px;
    color: #64748b;
    line-height: 1.8;
    margin: 0;
}


/* =========================================
   GROUP 4 ENRICHED SECTIONS (D1, D5–D11)
========================================= */

/* D1 — locality name + character tag in header */
.sps-locality-name {
    font-size: 24px;
    font-weight: 800;
    color: #0f172a;
    margin: 6px 0 4px;
    line-height: 1.2;
}

.sps-char-tag {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    color: #475569;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    padding: 3px 12px;
    border-radius: 999px;
    margin-bottom: 6px;
}

/* Base enriched section */
.sps-enrich-section {
    margin: 20px 0 0;
    padding: 20px 24px;
    background: #f8fafc;
    border-radius: 14px;
    border-left: 4px solid #2563eb;
}

.sps-enrich-heading {
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 12px;
}

.sps-profile-text {
    font-size: 15px;
    color: #374151;
    line-height: 1.8;
    margin: 0;
}

/* D8 — Known For tags */
.sps-known-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.sps-known-tag {
    display: inline-block;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1d4ed8;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    max-width: 200px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    vertical-align: middle;
}

/* D9 — Current season badge */
.sps-season-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    padding: 6px 14px;
    border-radius: 999px;
    margin-bottom: 12px;
}

.sps-season-icon  { font-size: 18px; line-height: 1; }

.sps-season-label {
    font-size: 13px;
    font-weight: 700;
    color: #166534;
}

/* D6 — Civic amenity score */
.sps-civic-wrap {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.sps-civic-score-num {
    font-size: 36px;
    font-weight: 800;
    line-height: 1;
    min-width: 70px;
}

.sps-civic-denom {
    font-size: 16px;
    font-weight: 600;
    color: #94a3b8;
    margin-left: 2px;
}

.sps-civic-bar-track {
    flex: 1;
    min-width: 120px;
    background: #e2e8f0;
    border-radius: 999px;
    height: 12px;
    overflow: hidden;
}

.sps-civic-bar {
    height: 100%;
    border-radius: 999px;
    transition: width 0.6s ease;
}

.sps-civic-label {
    font-size: 14px;
    font-weight: 700;
    min-width: 60px;
}


/* =========================================
   G5 — DISAMBIGUATION STATE SELECTOR
========================================= */

.sps-disambig {
    padding: 28px;
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 16px;
    margin: 20px 0;
}

.sps-disambig-msg {
    font-size: 16px;
    color: #0c4a6e;
    margin: 0 0 20px;
    line-height: 1.6;
}

.sps-disambig-msg strong { color: #0284c7; }

.sps-disambig-states {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.sps-disambig-state-btn {
    padding: 12px 22px;
    border: 2px solid #0284c7;
    background: #ffffff;
    color: #0284c7;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    min-height: 48px;
    transition: background 0.15s ease, color 0.15s ease, transform 0.1s ease;
}

.sps-disambig-state-btn:hover,
.sps-disambig-state-btn:focus {
    background: #0284c7;
    color: #ffffff;
    transform: translateY(-2px);
    outline: none;
}


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

@media (max-width: 768px) {

    .pincode-wrapper { padding: 16px; }

    .custom-top-nav {
        flex-direction: column;
        gap: 18px;
        text-align: center;
        padding: 20px;
    }

    .nav-links { justify-content: center; gap: 12px; }

    .hero-section { padding: 50px 24px; border-radius: 24px; }
    .hero-title   { font-size: 38px; line-height: 1.2; }
    .hero-subtitle { font-size: 18px; }

    .pincode-form { flex-direction: column; }
    .search-wrapper { max-width: 100%; }
    .pincode-form button { width: 100%; }

    .result-header  { flex-direction: column; align-items: flex-start; }
    .result-actions { width: 100%; }

    .info-block, .data-source-block { padding: 22px; }
    .info-block h2, .data-source-block h3 { font-size: 24px; }

    .explore-area-section { padding: 20px; }
    .explore-heading { font-size: 24px; }
    .explore-tag { font-size: 14px; padding: 10px 15px; }

    .trust-strip-track { gap: 28px; }
    .trust-strip-track span { font-size: 14px; }

    .sps-drilldown { padding: 16px; }
    .sps-drilldown-row { flex-direction: column; gap: 12px; }
    .sps-drilldown select { min-width: 0; width: 100%; max-width: 100%; }
    #sps-pincode-list { gap: 8px; }
    .pincode-pill { padding: 7px 12px; font-size: 13px; }

    .sps-skel-grid { grid-template-columns: 1fr; }

    .postal-type-grid { grid-template-columns: 1fr; gap: 16px; }
    .postal-type-card { padding: 24px 20px; }

    .sps-inline-map   { height: 220px; }
    .sps-map-legend   { gap: 10px; }

    /* C3 — Stats */
    .stats-strip      { flex-direction: column; gap: 24px; padding: 24px; }
    .stat-divider     { width: 60px; height: 1px; }
    .stat-number      { font-size: 36px; }

    /* C1/C2 — Trending */
    .trending-name    { font-size: 20px; }

    /* C4 — Map preview */
    .sps-homepage-map { height: 260px; }

    /* C5 — Quick tips */
    .quick-tips-row   { grid-template-columns: 1fr; }
    .quick-tip-card   { padding: 24px; }
    .tip-title        { font-size: 20px; }

    /* Group 4 — Enriched sections */
    .sps-locality-name   { font-size: 20px; }
    .sps-enrich-section  { padding: 16px 18px; }
    .sps-civic-score-num { font-size: 28px; min-width: 56px; }
    .sps-civic-bar-track { min-width: 80px; }

    /* G5 — Disambiguation */
    .sps-disambig           { padding: 20px; }
    .sps-disambig-state-btn { font-size: 14px; padding: 10px 18px; }
}

@media (max-width: 900px) {
    .trust-section { grid-template-columns: 1fr; }
}


/* =========================================
   TASK 8 — Trending name link
========================================= */

.trending-name-link {
    text-decoration: none;
    color: inherit;
}
.trending-name-link:hover .trending-name {
    color: #185fa5;
}


/* =========================================
   TASK 7 — State index pages
========================================= */

.sps-page-wrap {
    overflow-x: hidden;
    width: 100%;
}
.sps-state-page {
    padding: 20px 16px;
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}
.sps-state-header  { margin-bottom: 24px; }
.sps-state-header h1 {
    font-size: 22px;
    font-weight: 500;
    margin-bottom: 6px;
    word-break: break-word;
}
.sps-state-meta {
    font-size: 13px;
    color: #64748b;
}
.sps-state-division { margin-bottom: 24px; }
.sps-division-name {
    font-size: 15px;
    font-weight: 500;
    color: #1e293b;
    margin: 0 0 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid #e2e8f0;
    word-break: break-word;
}
.sps-pincode-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 8px;
    width: 100%;
    box-sizing: border-box;
}
.sps-pin-card {
    background: #fff;
    border: 0.5px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px 12px;
    text-decoration: none;
    display: block;
    color: inherit;
}
.sps-pin-enriched {
    border-color: #bfdbfe;
}
.sps-pin-enriched:hover {
    border-color: #185fa5;
    background: #eff6ff;
}
.sps-pin-num {
    font-size: 13px;
    font-weight: 500;
    color: #185fa5;
    display: block;
}
.sps-pin-name {
    font-size: 12px;
    color: #334155;
    display: block;
    margin-top: 2px;
}
.sps-pin-char {
    font-size: 10px;
    color: #64748b;
    display: block;
    margin-top: 2px;
}
.sps-pin-score {
    font-size: 10px;
    color: #3b6d11;
    font-weight: 500;
    display: block;
    margin-top: 2px;
}
.sps-state-back {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid #e2e8f0;
}
.sps-state-back a {
    font-size: 13px;
    color: #185fa5;
    text-decoration: none;
}


/* =========================================
   HOMEPAGE STATE GRID — 36 state links
========================================= */

.sps-state-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 8px;
    margin-top: 4px;
}
.sps-state-card {
    display: block;
    background: #fff;
    border: 0.5px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 500;
    color: #1e293b;
    text-decoration: none;
    text-align: center;
    transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.sps-state-card:hover {
    border-color: #185fa5;
    background: #eff6ff;
    color: #185fa5;
}

@media (max-width: 600px) {
    .sps-state-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .sps-pincode-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .sps-pin-card {
        padding: 8px 10px;
    }
}
