/* ==========================================================================
   Interactive Pan-India College ERP Network & Campus Hubs Stylesheet
   Theme: College ERP Redesign (Navy #0B1533 / Red #D92D3A / Accent #2563EB)
   ========================================================================== */

/* Main Section Wrapper */
.geo-network-section {
    position: relative;
    overflow: hidden;
    z-index: 10;
    isolation: isolate;
}

/* Header Badge & Pulse */
.hub-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    font-weight: 750;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #059669;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    padding: 6px 14px;
    border-radius: 999px;
}

.dark .hub-badge {
    color: #34d399;
    background: rgba(16, 185, 129, 0.15);
    border-color: rgba(16, 185, 129, 0.4);
}

.hub-badge-pulse {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 10px #10b981;
    animation: hubPulseAnim 1.8s infinite;
}

@keyframes hubPulseAnim {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.4); opacity: 0.45; }
}

/* 3D Radar Showcase Container */
.geo-radar-box {
    width: 100%;
    background: radial-gradient(circle at 50% 50%, rgba(37, 99, 235, 0.05) 0%, #ffffff 92%);
    border: 1px solid #e2e8f0;
    border-radius: 24px;
    padding: 24px 28px;
    position: relative;
    overflow: hidden;
    z-index: 5;
    isolation: isolate;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 28px;
    box-shadow: 0 16px 40px -12px rgba(11, 21, 51, 0.08);
    transition: all 0.3s ease;
}

.dark .geo-radar-box {
    background: radial-gradient(circle at 50% 50%, rgba(37, 99, 235, 0.14) 0%, #060c1f 88%);
    border-color: rgba(37, 99, 235, 0.32);
    box-shadow: 0 20px 50px rgba(6, 12, 31, 0.85);
}

/* Radar Top Bar */
.radar-top-bar {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
    font-size: 12px;
    font-weight: 800;
    color: #1e3a8a;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    flex-wrap: wrap;
    gap: 10px;
}

.dark .radar-top-bar {
    color: #60a5fa;
}

.radar-live-count {
    color: #059669;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.dark .radar-live-count {
    color: #34d399;
}

/* Map Color Theme Switcher Pill Buttons */
.map-theme-btn {
    color: #64748b;
    background: transparent;
    border: none;
    cursor: pointer;
    text-transform: none;
    font-weight: 700;
}

.map-theme-btn:hover {
    color: #0b1533;
}

.dark .map-theme-btn:hover {
    color: #ffffff;
}

.map-theme-btn.active {
    background: #ffffff;
    color: #0b1533;
    box-shadow: 0 1px 4px rgba(11, 21, 51, 0.12);
}

.dark .map-theme-btn.active {
    background: #1e293b;
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
}

/* 3D Map Canvas Wrapper */
.map-3d-canvas-wrap {
    position: relative;
    width: 100%;
    max-width: 1040px;
    aspect-ratio: 1200 / 896;
    margin: 8px auto 18px;
    background-image: url('../img/india_3d_network_map.webp');
    background-repeat: no-repeat;
    background-position: center center;
    background-size: contain;
    border-radius: 20px;
    overflow: visible;
}

/* 360-Degree Active Radar Scanner Grid */
.radar-360-scanner {
    position: absolute;
    top: 50%;
    left: 48%;
    width: 86%;
    height: 86%;
    max-width: 660px;
    max-height: 660px;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    border: 1px dashed rgba(37, 99, 235, 0.22);
    pointer-events: none;
    z-index: 2;
    overflow: hidden;
}

.radar-360-grid-rings {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    animation: radarScanRotate 20s linear infinite;
}

@keyframes radarScanRotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.radar-360-grid-rings::before {
    content: '';
    position: absolute;
    inset: 22%;
    border-radius: 50%;
    border: 1px solid rgba(56, 189, 248, 0.18);
}

.radar-360-grid-rings::after {
    content: '';
    position: absolute;
    inset: 48%;
    border-radius: 50%;
    border: 1px dashed rgba(16, 185, 129, 0.25);
}

.radar-360-crosshairs {
    position: absolute;
    inset: 0;
}

.radar-360-crosshairs::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(37, 99, 235, 0.2), transparent);
}

.radar-360-crosshairs::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 1px;
    background: linear-gradient(180deg, transparent, rgba(37, 99, 235, 0.2), transparent);
}

/* 3D Location Marker Pins */
.geo-3d-pin {
    position: absolute;
    display: inline-flex;
    align-items: center;
    text-decoration: none !important;
    cursor: pointer;
    transform: translate(-50%, -100%);
    transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), z-index 0.2s;
    z-index: 10;
    outline: none;
    user-select: none;
}

.geo-3d-pin:hover, 
.geo-3d-pin:focus, 
.geo-3d-pin.active {
    transform: translate(-50%, -115%) scale(1.18);
    z-index: 25;
}

.pin-marker-3d {
    width: 22px;
    height: 29px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    filter: drop-shadow(0 5px 8px rgba(0, 0, 0, 0.55));
    transition: transform 0.2s ease, filter 0.2s ease;
}

.pin-svg-3d {
    width: 100%;
    height: 100%;
    display: block;
}

.geo-3d-pin:hover .pin-marker-3d {
    filter: drop-shadow(0 6px 14px rgba(217, 45, 58, 0.85));
}

/* Trigger Point Dot on Land */
.pin-trigger-dot {
    position: absolute;
    bottom: -2.5px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 0 6px #d92d3a, 0 0 14px #d92d3a;
    z-index: 15;
    pointer-events: none;
}

/* 360 Sonar Ping Wave from Trigger Point */
.pin-360-sonar-wave {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translate(-50%, 50%);
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 1.5px solid #d92d3a;
    animation: sonar360Pulse 2.3s cubic-bezier(0.1, 0.2, 0.3, 1) infinite;
    pointer-events: none;
    z-index: 1;
}

@keyframes sonar360Pulse {
    0% { transform: translate(-50%, 50%) scale(0.3); opacity: 0.95; }
    100% { transform: translate(-50%, 50%) scale(3.2); opacity: 0; }
}

/* Active City Rotating Target Reticle */
.pin-360-reticle {
    display: none;
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translate(-50%, 50%);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1.5px dashed rgba(217, 45, 58, 0.9);
    animation: reticle360Spin 4s linear infinite;
    pointer-events: none;
    z-index: 2;
}

.geo-3d-pin.active .pin-360-reticle, 
.geo-3d-pin:hover .pin-360-reticle {
    display: block;
}

@keyframes reticle360Spin {
    0% { transform: translate(-50%, 50%) rotate(0deg); }
    100% { transform: translate(-50%, 50%) rotate(360deg); }
}

.pin-ground-pulse {
    position: absolute;
    bottom: -3px;
    left: 50%;
    transform: translateX(-50%);
    width: 12px;
    height: 6px;
    border-radius: 50%;
    background: rgba(217, 45, 58, 0.5);
    box-shadow: 0 0 10px #d92d3a;
    animation: pinGroundRipple 2.2s cubic-bezier(0, 0, 0.2, 1) infinite;
    pointer-events: none;
}

@keyframes pinGroundRipple {
    0% { transform: translateX(-50%) scale(0.6); opacity: 0.9; }
    80%, 100% { transform: translateX(-50%) scale(2.2); opacity: 0; }
}

/* Leader Label Tag */
.pin-label-tag {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: #0b1533;
    font-size: 9.5px;
    font-weight: 800;
    padding: 2px 6.5px;
    border-radius: 5px;
    white-space: nowrap;
    margin-left: 3px;
    letter-spacing: 0.5px;
    box-shadow: 0 3px 8px rgba(11, 21, 51, 0.12);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    display: inline-flex;
    align-items: center;
    text-transform: uppercase;
}

.dark .pin-label-tag {
    background: rgba(11, 21, 51, 0.95);
    border-color: rgba(255, 255, 255, 0.28);
    color: #ffffff;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.6);
}

.geo-3d-pin:hover .pin-label-tag, 
.geo-3d-pin.active .pin-label-tag {
    background: linear-gradient(135deg, #d92d3a, #b91c28);
    border-color: #fca5a5;
    color: #ffffff;
    transform: translateX(2px) scale(1.06);
    box-shadow: 0 4px 16px rgba(217, 45, 58, 0.65);
}

/* Tag Left Orientation to Avoid Collision */
.geo-3d-pin.tag-left {
    flex-direction: row-reverse;
}

.geo-3d-pin.tag-left .pin-label-tag {
    margin-left: 0;
    margin-right: 3px;
}

.geo-3d-pin.tag-left:hover .pin-label-tag, 
.geo-3d-pin.tag-left.active .pin-label-tag {
    transform: translateX(-2px) scale(1.06);
}

.geo-3d-pin.tag-top {
    flex-direction: column-reverse;
}

.geo-3d-pin.tag-top .pin-label-tag {
    margin-left: 0;
    margin-bottom: 3px;
}

.geo-3d-pin.tag-bottom {
    flex-direction: column;
}

.geo-3d-pin.tag-bottom .pin-label-tag {
    margin-left: 0;
    margin-top: 3px;
}

/* Flagship Pin Highlight (Jaipur) */
.geo-3d-pin.vip-jaipur .pin-label-tag {
    background: linear-gradient(135deg, #be123c, #d92d3a);
    border-color: #fda4af;
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(217, 45, 58, 0.5);
}

/* HQ Pin Highlight (Bhopal / Surat) */
.geo-3d-pin.hq-bhopal .pin-label-tag,
.geo-3d-pin.hq-surat .pin-label-tag {
    background: linear-gradient(135deg, #059669, #10b981);
    border-color: #a7f3d0;
    color: #ffffff;
    font-size: 10px;
    font-weight: 800;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.55);
}

/* Mobile scaling for 3D map pins */
@media (max-width: 640px) {
    .map-3d-canvas-wrap {
        min-height: 290px;
    }
    .pin-marker-3d {
        width: 17px;
        height: 23px;
    }
    .pin-label-tag {
        font-size: 8px;
        padding: 1.5px 4.5px;
    }
}

/* Full-Width HUD Banner Below Map */
.radar-hud-card {
    width: 100%;
    max-width: 980px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 18px;
    padding: 16px 22px;
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    box-shadow: 0 4px 16px rgba(11, 21, 51, 0.05);
    transition: all 0.3s ease;
}

.dark .radar-hud-card {
    background: rgba(11, 21, 51, 0.85);
    border-color: rgba(37, 99, 235, 0.35);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.hud-left-meta {
    flex: 1 1 340px;
}

.hud-right-action {
    flex: 0 0 auto;
}

.hud-title-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 5px;
    flex-wrap: wrap;
}

.hud-city-name {
    font-size: 16px;
    font-weight: 800;
    color: #0b1533;
}

.dark .hud-city-name {
    color: #ffffff;
}

.hud-badge-tier {
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    padding: 3px 9px;
    border-radius: 6px;
    background: linear-gradient(135deg, #d92d3a, #b91c28);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(217, 45, 58, 0.3);
}

.hud-desc {
    font-size: 12.5px;
    color: #475569;
    margin: 0;
    line-height: 1.45;
}

.dark .hud-desc {
    color: #94a3b8;
}

.hud-cta-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 22px;
    background: linear-gradient(135deg, #d92d3a, #b91c28);
    color: #ffffff !important;
    font-size: 13.5px;
    font-weight: 750;
    border-radius: 12px;
    text-decoration: none !important;
    box-shadow: 0 4px 16px rgba(217, 45, 58, 0.35);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    white-space: nowrap;
    cursor: pointer;
}

.hud-cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 22px rgba(217, 45, 58, 0.55);
}

/* Regional Matrix Panel */
.geo-matrix-panel {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* Search Bar for Quick District Finding */
.hub-search-box {
    position: relative;
    width: 100%;
    max-width: 420px;
}

.hub-search-input {
    width: 100%;
    padding: 8px 14px 8px 36px;
    border-radius: 999px;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: #0b1533;
    font-size: 12.5px;
    font-weight: 500;
    outline: none;
    transition: all 0.2s ease;
}

.dark .hub-search-input {
    background: rgba(11, 21, 51, 0.6);
    border-color: rgba(255, 255, 255, 0.15);
    color: #f1f5f9;
}

.hub-search-input:focus {
    border-color: #d92d3a;
    box-shadow: 0 0 0 3px rgba(217, 45, 58, 0.15);
}

.hub-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    pointer-events: none;
    width: 15px;
    height: 15px;
}

/* Filter Tabs */
.hub-filter-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    width: 100%;
}

.hub-tab-btn {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    color: #475569;
    font-size: 12px;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    user-select: none;
}

.dark .hub-tab-btn {
    background: rgba(22, 35, 77, 0.6);
    border-color: rgba(255, 255, 255, 0.1);
    color: #cbd5e1;
}

.hub-tab-btn:hover {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #1d4ed8;
}

.dark .hub-tab-btn:hover {
    background: rgba(37, 99, 235, 0.2);
    border-color: rgba(96, 165, 250, 0.45);
    color: #ffffff;
}

.hub-tab-btn.active {
    background: linear-gradient(135deg, #d92d3a, #b91c28);
    border-color: transparent;
    color: #ffffff;
    box-shadow: 0 3px 12px rgba(217, 45, 58, 0.35);
}

/* Ultra-Compact High-Density District Directory Grid */
.hub-cities-grid {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 7px;
}

.hub-city-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 6px 10px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    text-decoration: none !important;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
    min-height: 38px;
    height: 38px;
    box-sizing: border-box;
    cursor: pointer;
}

.dark .hub-city-card {
    background: rgba(22, 35, 77, 0.45);
    border-color: rgba(255, 255, 255, 0.08);
}

.hub-city-card:hover {
    transform: translateY(-1.5px);
    background: #fef2f2;
    border-color: #fca5a5;
    box-shadow: 0 4px 14px rgba(217, 45, 58, 0.15);
}

.dark .hub-city-card:hover {
    background: rgba(37, 99, 235, 0.18);
    border-color: rgba(96, 165, 250, 0.6);
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.25);
}

/* VIP City Highlight */
.hub-city-card.vip-city {
    border-color: rgba(217, 45, 58, 0.35);
    background: linear-gradient(135deg, rgba(217, 45, 58, 0.05), rgba(37, 99, 235, 0.05));
}

.dark .hub-city-card.vip-city {
    border-color: rgba(217, 45, 58, 0.5);
    background: linear-gradient(135deg, rgba(217, 45, 58, 0.12), rgba(37, 99, 235, 0.12));
}

.hub-city-card.vip-city::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #d92d3a, #2563eb);
}

.city-card-header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 0;
    min-width: 0;
    overflow: hidden;
}

.city-card-name {
    font-size: 12px;
    font-weight: 750;
    color: #0b1533;
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dark .city-card-name {
    color: #ffffff;
}

.city-card-badge {
    font-size: 8.5px;
    font-weight: 800;
    padding: 2px 5.5px;
    border-radius: 4px;
    background: #fee2e2;
    color: #b91c28;
    text-transform: uppercase;
    white-space: nowrap;
    line-height: 1.2;
}

.dark .city-card-badge {
    background: rgba(217, 45, 58, 0.25);
    color: #fca5a5;
}

.city-card-sub-tag {
    font-size: 9px;
    font-weight: 700;
    color: #64748b;
    background: #f1f5f9;
    padding: 1.5px 5px;
    border-radius: 3px;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.dark .city-card-sub-tag {
    color: #94a3b8;
    background: rgba(255, 255, 255, 0.08);
}

.city-card-sub {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 0;
    flex-shrink: 0;
}

.city-card-arrow {
    color: #d92d3a;
    font-size: 10px;
    opacity: 0.55;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.hub-city-card:hover .city-card-arrow {
    opacity: 1;
    transform: translateX(3px);
}

@media (max-width: 768px) {
    .hub-cities-grid {
        grid-template-columns: repeat(2, 1fr);
        max-height: 320px;
        overflow-y: auto;
        padding-right: 4px;
    }
    .hub-cities-grid::-webkit-scrollbar {
        width: 4px;
    }
    .hub-cities-grid::-webkit-scrollbar-thumb {
        background: rgba(217, 45, 58, 0.4);
        border-radius: 4px;
    }
}
