/* =========================================================
   MahaFind – Pincode Detail Page: 3D Premium Green Theme
   Matches home-3d.css design tokens exactly.
   Author: MahaFind UI
   ========================================================= */

/* ─── Page Base ─── */
.pincode-detail-page {
    background: var(--h3d-primary-bg, #f0faf4);
    font-family: 'Inter', 'Segoe UI', sans-serif;
}

/* =========================================================
   HERO BANNER (replaces plain h1)
   ========================================================= */
.pcd-hero {
    background: linear-gradient(135deg, #15803d 0%, #16a34a 45%, #22c55e 100%);
    position: relative;
    overflow: hidden;
    padding: 3rem 0 5rem;
    color: #fff;
    isolation: isolate;
    margin-bottom: -3rem;
}

/* Grid overlay */
.pcd-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
}
/* Orb */
.pcd-hero::after {
    content: '';
    position: absolute;
    top: -80px; right: -80px;
    width: 380px; height: 380px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,0.12) 0%, transparent 70%);
    animation: pcd-orb 8s ease-in-out infinite;
    pointer-events: none;
}
@keyframes pcd-orb {
    0%, 100% { transform: translateY(0) scale(1); }
    50%       { transform: translateY(-25px) scale(1.07); }
}

.pcd-hero-content { position: relative; z-index: 2; }

/* Breadcrumb in hero */
.pcd-breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
    margin-bottom: 1.2rem;
    font-size: 0.82rem;
}
.pcd-breadcrumb a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: color 0.2s;
}
.pcd-breadcrumb a:hover { color: #fff; }
.pcd-breadcrumb .sep { color: rgba(255,255,255,0.4); font-size: 0.7rem; }
.pcd-breadcrumb .cur { color: rgba(255,255,255,0.65); }

/* Page Title */
.pcd-hero-title {
    font-size: clamp(1.6rem, 3.5vw, 2.6rem);
    font-weight: 900;
    line-height: 1.2;
    margin-bottom: 1.2rem;
    text-shadow: 0 4px 24px rgba(0,0,0,0.15);
    animation: pcd-fadein 0.6s ease both;
}
@keyframes pcd-fadein {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Badge Row */
.pcd-badge-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
    animation: pcd-fadein 0.7s ease both 0.1s;
}
.pcd-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 0.35rem 0.9rem;
    border-radius: 9999px;
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.3);
    white-space: nowrap;
}
.pcd-badge-pin {
    background: rgba(255,255,255,0.25);
    color: #fff;
    font-size: 1rem;
    padding: 0.4rem 1.2rem;
    letter-spacing: 1px;
}
.pcd-badge-digipin { background: rgba(134,239,172,0.25); color: #bbf7d0; }
.pcd-badge-district { background: rgba(255,255,255,0.15); color: rgba(255,255,255,0.9); }
.pcd-badge-state    { background: rgba(255,255,255,0.15); color: rgba(255,255,255,0.9); }
.pcd-badge-zone     { background: rgba(245,158,11,0.25); color: #fde68a; }
.pcd-badge-zone.delivery { background: rgba(34,197,94,0.2); color: #86efac; }

/* Office tag */
.pcd-office-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.8);
    animation: pcd-fadein 0.7s ease both 0.2s;
}
.pcd-office-tag i { color: #86efac; }

/* =========================================================
   MAIN CONTENT CARD (3D glass, lifted from hero)
   ========================================================= */
.pcd-main {
    position: relative;
    z-index: 10;
}

/* Quick stats row (top of content) */
.pcd-quick-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
    animation: pcd-fadein 0.8s ease both 0.2s;
}
.pcd-qs-item {
    background: #fff;
    border-radius: 16px;
    padding: 1.1rem 1rem;
    text-align: center;
    border: 1px solid rgba(22,163,74,0.1);
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}
.pcd-qs-item::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, #16a34a, #22c55e);
}
.pcd-qs-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(22,163,74,0.18);
    border-color: rgba(22,163,74,0.25);
}
.pcd-qs-icon {
    width: 40px; height: 40px;
    background: #dcfce7;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: #16a34a;
    margin: 0 auto 0.6rem;
    transition: transform 0.3s;
}
.pcd-qs-item:hover .pcd-qs-icon { transform: rotateY(15deg) scale(1.1); }
.pcd-qs-value {
    font-size: 1rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.2;
    word-break: break-word;
}
.pcd-qs-label {
    font-size: 0.68rem;
    color: #64748b;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 0.25rem;
}

/* =========================================================
   DETAIL CARD (main info)
   ========================================================= */
.pcd-card {
    background: #fff;
    border-radius: 20px;
    border: 1px solid rgba(22,163,74,0.1);
    box-shadow: 0 8px 32px rgba(0,0,0,0.08);
    margin-bottom: 1.5rem;
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}
.pcd-card:hover {
    box-shadow: 0 16px 60px rgba(22,163,74,0.15);
}

.pcd-card-header {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 1rem 1.4rem;
    background: linear-gradient(135deg, #f0faf4 0%, #dcfce7 100%);
    border-bottom: 1px solid rgba(22,163,74,0.12);
    font-weight: 800;
    font-size: 0.95rem;
    color: #15803d;
}
.pcd-card-header i {
    width: 32px; height: 32px;
    background: #16a34a;
    color: #fff;
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.85rem;
    flex-shrink: 0;
}
.pcd-card-body {
    padding: 1.4rem;
}

/* =========================================================
   INFO GRID (Detailed Information)
   ========================================================= */
.pcd-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
}
.pcd-info-row {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
    padding: 0.7rem 0.5rem;
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.2s;
}
.pcd-info-row:hover { background: #f8fffe; }
.pcd-info-row:last-child { border-bottom: none; }
.pcd-info-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    min-width: 100px;
    flex-shrink: 0;
}
.pcd-info-value {
    font-size: 0.92rem;
    font-weight: 600;
    color: #0f172a;
    word-break: break-word;
}
.pcd-info-value .highlight-pin {
    background: #dcfce7;
    color: #15803d;
    border-radius: 6px;
    padding: 0.15rem 0.6rem;
    font-weight: 800;
    font-size: 1rem;
    letter-spacing: 0.5px;
}
.pcd-info-value .highlight-digipin {
    background: #eff6ff;
    color: #2563eb;
    border-radius: 6px;
    padding: 0.15rem 0.6rem;
    font-weight: 700;
    font-family: monospace;
    font-size: 0.95rem;
}
.pcd-zone-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: #dcfce7;
    color: #15803d;
    border-radius: 20px;
    padding: 0.2rem 0.7rem;
    font-size: 0.8rem;
    font-weight: 700;
}
.pcd-zone-badge.hq { background: #fef3c7; color: #92400e; }
.pcd-zone-badge.nd { background: #f3f4f6; color: #4b5563; }

/* =========================================================
   DIGIPIN BANNER
   ========================================================= */
.pcd-digipin-banner {
    background: linear-gradient(135deg, #15803d 0%, #16a34a 60%, #22c55e 100%);
    border-radius: 18px;
    padding: 1.4rem 1.6rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(22,163,74,0.30);
    animation: pcd-fadein 0.7s ease both 0.3s;
}
.pcd-digipin-banner::after {
    content: '';
    position: absolute;
    right: -40px; top: -40px;
    width: 200px; height: 200px;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    pointer-events: none;
}
.pcd-digipin-banner-text h4 {
    font-size: 1rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 0.25rem;
}
.pcd-digipin-banner-text p {
    font-size: 0.82rem;
    color: rgba(255,255,255,0.8);
    margin: 0;
}
.pcd-digipin-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.35);
    color: #fff;
    border-radius: 10px;
    padding: 0.55rem 1.2rem;
    font-size: 0.82rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.25s ease;
    white-space: nowrap;
    position: relative;
    z-index: 1;
}
.pcd-digipin-btn:hover {
    background: rgba(255,255,255,0.32);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.12);
}

/* =========================================================
   PINCODE BREAKDOWN (digit-level explainer)
   ========================================================= */
.pcd-breakdown-grid {
    display: flex;
    gap: 0.75rem;
    flex-wrap: nowrap;
    justify-content: center;
}
.pcd-bd-item {
    flex: 1;
    text-align: center;
    background: #fff;
    border: 1px solid rgba(22,163,74,0.12);
    border-radius: 14px;
    padding: 1rem 0.75rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    transition: all 0.3s cubic-bezier(0.34,1.56,0.64,1);
    position: relative;
    overflow: hidden;
}
.pcd-bd-item::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: var(--bd-color, #16a34a);
}
.pcd-bd-item:hover {
    transform: translateY(-6px) scale(1.03);
    box-shadow: 0 16px 40px rgba(22,163,74,0.20);
    border-color: rgba(22,163,74,0.3);
}
.pcd-bd-item:nth-child(1) { --bd-color: #16a34a; }
.pcd-bd-item:nth-child(2) { --bd-color: #2563eb; }
.pcd-bd-item:nth-child(3) { --bd-color: #d97706; }
.pcd-bd-item:nth-child(4) { --bd-color: #9333ea; }
.pcd-bd-digit {
    font-size: 2.2rem;
    font-weight: 900;
    color: #0f172a;
    line-height: 1;
    margin-bottom: 0.5rem;
    display: block;
}
.pcd-bd-digit.multi { font-size: 1.5rem; letter-spacing: 0.5px; }
.pcd-bd-label {
    font-size: 0.72rem;
    color: #64748b;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: block;
    margin-bottom: 0.3rem;
}
.pcd-bd-desc {
    font-size: 0.8rem;
    color: #334155;
    font-weight: 600;
    line-height: 1.3;
    word-break: break-word;
}

/* =========================================================
   MAP CARD
   ========================================================= */
.pcd-map-container {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0,0,0,0.10);
    border: 1px solid rgba(22,163,74,0.12);
}
.pcd-map-container iframe,
.pcd-map-container #detail-map {
    width: 100%;
    height: 320px;
    border: none;
    display: block;
}

/* =========================================================
   VILLAGES LIST
   ========================================================= */
.pcd-village-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}
.pcd-village-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: #f8fffe;
    border: 1px solid rgba(22,163,74,0.1);
    border-radius: 12px;
    transition: all 0.25s ease;
    text-decoration: none;
    color: inherit;
}
.pcd-village-item:hover {
    background: #dcfce7;
    border-color: #16a34a;
    transform: translateX(4px);
    box-shadow: 0 4px 16px rgba(22,163,74,0.15);
}
.pcd-village-icon {
    width: 36px; height: 36px;
    background: #dcfce7;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    color: #16a34a;
    font-size: 0.9rem;
    flex-shrink: 0;
    transition: background 0.25s;
}
.pcd-village-item:hover .pcd-village-icon { background: #16a34a; color: #fff; }
.pcd-village-name {
    font-size: 0.88rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.3;
}
.pcd-village-sub {
    font-size: 0.75rem;
    color: #64748b;
}
.pcd-village-btn {
    margin-left: auto;
    flex-shrink: 0;
    font-size: 0.72rem;
    padding: 0.2rem 0.6rem;
    border-radius: 6px;
    background: transparent;
    border: 1px solid #16a34a;
    color: #16a34a;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s;
}
.pcd-village-item:hover .pcd-village-btn {
    background: #16a34a;
    color: #fff;
}

/* Village pagination */
.pcd-pagination {
    display: flex;
    justify-content: center;
    gap: 0.4rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}
.pcd-page-btn {
    width: 34px; height: 34px;
    border-radius: 8px;
    border: 1.5px solid #e2e8f0;
    background: #fff;
    color: #334155;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex; align-items: center; justify-content: center;
}
.pcd-page-btn:hover, .pcd-page-btn.active {
    background: #16a34a;
    border-color: #16a34a;
    color: #fff;
    box-shadow: 0 4px 12px rgba(22,163,74,0.3);
}

/* =========================================================
   NEARBY PINCODES
   ========================================================= */
.pcd-nearby-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.75rem;
}
.pcd-nearby-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    padding: 0.9rem 0.75rem;
    background: #fff;
    border: 1px solid rgba(22,163,74,0.10);
    border-radius: 14px;
    text-decoration: none;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.34,1.56,0.64,1);
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.pcd-nearby-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 36px rgba(22,163,74,0.20);
    border-color: rgba(22,163,74,0.3);
    background: #f0faf4;
}
.pcd-nearby-pin {
    font-size: 1.05rem;
    font-weight: 900;
    color: #16a34a;
    display: block;
}
.pcd-nearby-name {
    font-size: 0.72rem;
    color: #334155;
    font-weight: 600;
    line-height: 1.3;
}
.pcd-nearby-dist {
    font-size: 0.65rem;
    color: #94a3b8;
    display: flex; align-items: center; gap: 0.2rem;
}

/* =========================================================
   SIDEBAR
   ========================================================= */
.pcd-sidebar { position: sticky; top: 80px; }

.pcd-sidebar-card {
    background: #fff;
    border-radius: 18px;
    border: 1px solid rgba(22,163,74,0.1);
    box-shadow: 0 8px 32px rgba(0,0,0,0.07);
    margin-bottom: 1.25rem;
    overflow: hidden;
}
.pcd-sidebar-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.9rem 1.2rem;
    background: #f0faf4;
    border-bottom: 1px solid rgba(22,163,74,0.1);
    font-weight: 800;
    font-size: 0.85rem;
    color: #15803d;
}
.pcd-sidebar-body { padding: 1.1rem 1.2rem; }

/* Quick Info rows in sidebar */
.pcd-si-row {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    padding: 0.6rem 0;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.85rem;
}
.pcd-si-row:last-child { border-bottom: none; }
.pcd-si-icon {
    width: 28px; height: 28px;
    border-radius: 8px;
    background: #dcfce7;
    color: #16a34a;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.75rem;
    flex-shrink: 0;
}
.pcd-si-label { font-size: 0.7rem; color: #94a3b8; font-weight: 600; text-transform: uppercase; letter-spacing: 0.3px; }
.pcd-si-val { font-size: 0.88rem; font-weight: 700; color: #0f172a; }

/* Copy button */
.pcd-copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: linear-gradient(135deg, #16a34a, #15803d);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 0.55rem 1.1rem;
    font-size: 0.8rem;
    font-weight: 700;
    width: 100%;
    justify-content: center;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 4px 14px rgba(22,163,74,0.3);
    text-decoration: none;
    margin-top: 0.5rem;
}
.pcd-copy-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(22,163,74,0.45);
    color: #fff;
}
.pcd-copy-btn.copied {
    background: linear-gradient(135deg, #0284c7, #0369a1);
    box-shadow: 0 4px 14px rgba(2,132,199,0.3);
}

/* Search widget in sidebar */
.pcd-search-widget input {
    width: 100%;
    padding: 0.7rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 0.9rem;
    font-family: 'Inter', sans-serif;
    background: #fafbfc;
    color: #1e293b;
    margin-bottom: 0.6rem;
    transition: border-color 0.25s, box-shadow 0.25s;
    outline: none;
}
.pcd-search-widget input:focus {
    border-color: #16a34a;
    box-shadow: 0 0 0 3px rgba(22,163,74,0.12);
    background: #fff;
}
.pcd-search-widget button {
    width: 100%;
    padding: 0.7rem;
    background: linear-gradient(135deg, #16a34a, #15803d);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.88rem;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 4px 14px rgba(22,163,74,0.3);
}
.pcd-search-widget button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(22,163,74,0.45);
}

/* =========================================================
   SEO CONTENT SECTION
   ========================================================= */
.pcd-seo-section {
    background: linear-gradient(135deg, #f0faf4 0%, #dcfce7 100%);
    padding: 3rem 0;
}
.pcd-seo-card {
    background: #fff;
    border-radius: 20px;
    border: 1px solid rgba(22,163,74,0.12);
    box-shadow: 0 8px 32px rgba(0,0,0,0.06);
    padding: 2rem;
}
.pcd-seo-card h2 {
    font-size: 1.3rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.pcd-seo-card h2 i { color: #16a34a; }
.pcd-seo-card p {
    font-size: 0.9rem;
    color: #475569;
    line-height: 1.75;
    margin-bottom: 0.75rem;
}

/* =========================================================
   ANIMATIONS — fade-in on scroll
   ========================================================= */
.pcd-animate {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.pcd-animate.visible {
    opacity: 1;
    transform: translateY(0);
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 991px) {
    .pcd-quick-stats { grid-template-columns: repeat(2, 1fr); }
    .pcd-info-grid   { grid-template-columns: 1fr; }
    .pcd-sidebar     { position: static; margin-top: 1.5rem; }
    .pcd-hero        { padding: 2rem 0 4rem; }
    .pcd-breakdown-grid { flex-wrap: wrap; }
    .pcd-bd-item     { min-width: calc(50% - 0.375rem); }
    .pcd-hero::after { display: none; }
}
@media (max-width: 576px) {
    .pcd-quick-stats { grid-template-columns: repeat(2, 1fr); gap: 0.6rem; }
    .pcd-qs-item     { padding: 0.8rem 0.6rem; }
    .pcd-qs-value    { font-size: 0.85rem; }
    .pcd-hero-title  { font-size: 1.4rem; }
    .pcd-village-grid{ grid-template-columns: 1fr; }
    .pcd-nearby-grid { grid-template-columns: repeat(2, 1fr); }
    .pcd-digipin-banner { flex-direction: column; text-align: center; }
}
