/* ==========================================================================
   State Wise Courses & Interactive Map Page Styles
   Study in India Portal Design System
   ========================================================================== */

:root {
    --sii-navy: #064e5a;
    --sii-navy-dark: #032b32;
    --sii-orange: #ff671f;
    --sii-orange-dark: #e65a1a;
    --sii-blue: #0049d0;
    --sii-bg: #f8fafc;
    --sii-border: #e2e8f0;
    --sii-text: #1e293b;
    --sii-text-muted: #64748b;
}

.state-wise-page {
    background-color: var(--sii-bg);
    min-height: 80vh;
    padding: 36px 0 60px;
    position: relative;
    overflow: hidden;
}

/* Background Subtle Ambient Glows */
.state-wise-page::before {
    content: '';
    position: absolute;
    top: -80px;
    left: -80px;
    width: 340px;
    height: 340px;
    background: radial-gradient(circle, rgba(255, 103, 31, 0.07) 0%, rgba(255, 103, 31, 0) 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
}

.state-wise-page::after {
    content: '';
    position: absolute;
    bottom: -80px;
    right: -80px;
    width: 380px;
    height: 380px;
    background: radial-gradient(circle, rgba(0, 73, 208, 0.05) 0%, rgba(0, 73, 208, 0) 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
}

/* Page Intro Header */
.page-intro-header {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.section-main-heading {
    font-size: 2rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 12px;
    letter-spacing: -0.5px;
}

.heading-accent-line {
    width: 60px;
    height: 4px;
    background: var(--sii-orange);
    border-radius: 4px;
    margin-bottom: 14px;
}

.section-sub-text {
    font-size: 1rem;
    color: var(--sii-text-muted);
    line-height: 1.6;
    margin-bottom: 0;
}

/* 2-Column Cards */
.popular-map-card,
.popular-explorer-card {
    background: #ffffff;
    border-radius: 20px;
    border: 1px solid rgba(0, 0, 0, 0.07);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
    transition: all 0.3s ease;
    height: 100%;
    position: relative;
    z-index: 1;
}

.popular-map-card:hover,
.popular-explorer-card:hover {
    box-shadow: 0 15px 35px rgba(15, 23, 42, 0.08);
}

/* Map Header Bar */
.map-card-header {
    padding: 16px 22px;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    background: linear-gradient(to right, #ffffff, #fafbfd);
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
}

.map-badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 14px;
    background: #fff4ed;
    color: var(--sii-orange);
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    border: 1px solid rgba(255, 103, 31, 0.2);
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background-color: var(--sii-orange);
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 0 0 rgba(255, 103, 31, 0.7);
    animation: pulse-orange 1.8s infinite;
}

@keyframes pulse-orange {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(255, 103, 31, 0.7);
    }
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 8px rgba(255, 103, 31, 0);
    }
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(255, 103, 31, 0);
    }
}

.map-helper-hint {
    font-size: 0.8rem;
    color: var(--sii-text-muted);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Map Canvas Container */
.map-canvas-container {
    position: relative;
    padding: 12px;
    overflow: hidden;
    background: #ffffff;
    border-bottom-left-radius: 20px;
    border-bottom-right-radius: 20px;
}

#map1 {
    width: 100%;
    height: 600px;
    border-radius: 14px;
    background: #ffffff !important;
}

/* Custom Floating Controls */
.map-floating-controls {
    position: absolute;
    top: 24px;
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    z-index: 10;
}

.map-ctrl-btn {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: #ffffff;
    border: 1px solid var(--sii-border);
    color: #334155;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.2s ease;
    cursor: pointer;
    padding: 0;
}

.map-ctrl-btn:hover {
    background: var(--sii-orange);
    color: #ffffff;
    border-color: var(--sii-orange);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255, 103, 31, 0.25);
}

/* Explorer Card Styling */
.popular-explorer-card {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

/* Active State Preview Banner */
.active-state-preview {
    background: linear-gradient(135deg, var(--sii-navy) 0%, var(--sii-navy-dark) 100%);
    color: #ffffff;
    border-radius: 16px;
    padding: 20px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(6, 78, 90, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.active-state-preview::after {
    content: '';
    position: absolute;
    top: -30px;
    right: -30px;
    width: 110px;
    height: 110px;
    background: radial-gradient(circle, rgba(255, 103, 31, 0.35) 0%, rgba(255, 103, 31, 0) 70%);
    border-radius: 50%;
}

.preview-top-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.preview-tag {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #ff9d66;
}

.active-state-badge {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 50px;
    backdrop-filter: blur(4px);
}

.active-state-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 6px;
}

.active-state-desc {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.82);
    line-height: 1.45;
    margin-bottom: 16px;
    min-height: 2.4rem;
}

.btn-explore-state {
    background: var(--sii-orange);
    color: #ffffff !important;
    border: none;
    border-radius: 10px;
    padding: 11px 18px;
    font-size: 0.88rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-decoration: none;
    transition: all 0.25s ease;
    box-shadow: 0 4px 14px rgba(255, 103, 31, 0.35);
}

.btn-explore-state:hover {
    background: var(--sii-orange-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(255, 103, 31, 0.45);
}

/* State Quick Search Box */
.state-search-box {
    position: relative;
}

.state-search-input {
    width: 100%;
    padding: 11px 40px 11px 42px;
    border: 1px solid var(--sii-border);
    border-radius: 12px;
    font-size: 0.88rem;
    color: var(--sii-text);
    background-color: #f8fafc;
    transition: all 0.2s ease;
}

.state-search-input:focus {
    outline: none;
    background-color: #ffffff;
    border-color: var(--sii-orange);
    box-shadow: 0 0 0 3px rgba(255, 103, 31, 0.12);
}

.search-icon-inside {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 0.95rem;
    pointer-events: none;
}

.search-clear-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    background: transparent;
    border: none;
    padding: 0;
    font-size: 0.95rem;
    cursor: pointer;
    display: none;
}

.search-clear-btn:hover {
    color: #475569;
}

/* Region Filter Zone Pills */
.region-filter-wrapper {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    overflow-x: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.region-filter-wrapper::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

.region-pill {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid transparent;
    padding: 5px 12px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.region-pill:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.region-pill.active {
    background: var(--sii-navy);
    color: #ffffff;
    border-color: var(--sii-navy);
    box-shadow: 0 3px 8px rgba(6, 78, 90, 0.2);
}

/* Popular Destinations Title */
.popular-hubs-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2px;
}

.popular-hubs-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: #334155;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.popular-hubs-count {
    font-size: 0.75rem;
    color: #94a3b8;
    font-weight: 600;
}

/* Popular Hubs Grid / Pills */
.popular-hubs-container {
    max-height: 240px;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 4px;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}

.popular-hubs-container::-webkit-scrollbar {
    width: 4px;
}

.popular-hubs-container::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

.popular-hubs-container::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.popular-hubs-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.state-chip-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 13px;
    background: #f8fafc;
    border: 1px solid var(--sii-border);
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #334155;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.state-chip-btn .chip-icon {
    color: var(--sii-orange);
    font-size: 0.85rem;
}

.state-chip-btn:hover {
    background: #ffffff;
    border-color: var(--sii-orange);
    color: var(--sii-orange);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(255, 103, 31, 0.12);
}

.state-chip-btn.active {
    background: var(--sii-orange);
    color: #ffffff;
    border-color: var(--sii-orange);
    box-shadow: 0 4px 12px rgba(255, 103, 31, 0.25);
}

.state-chip-btn.active .chip-icon {
    color: #ffffff;
}

/* AmCharts Modern Map Overrides */
.amcharts-map-area {
    cursor: pointer;
    transition: fill 0.25s cubic-bezier(0.4, 0, 0.2, 1), stroke 0.25s ease, filter 0.25s ease;
}

.amcharts-map-area:hover {
    filter: drop-shadow(0 4px 10px rgba(255, 103, 31, 0.35));
}

.amcharts-map-image {
    cursor: pointer;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), fill 0.2s ease;
}

.amcharts-map-image:hover {
    filter: drop-shadow(0 2px 6px rgba(255, 103, 31, 0.5));
}

/* Hide default Amcharts raw controls to use sleek custom floating controls */
.amcharts-map-home-button,
.amcharts-map-zoom-in,
.amcharts-map-zoom-out,
.amcharts-zoom-control {
    display: none !important;
}

.amcharts-balloon-div {
    font-family: var(--default-font, 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif) !important;
    border-radius: 12px !important;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.16) !important;
    padding: 10px 16px !important;
    border: 1px solid rgba(255, 255, 255, 0.8) !important;
    background: rgba(255, 255, 255, 0.97) !important;
    backdrop-filter: blur(8px) !important;
    color: #0f172a !important;
    font-weight: 600 !important;
    font-size: 0.86rem !important;
    line-height: 1.4 !important;
}

/* Responsive Adjustments */
@media (max-width: 991.98px) {
    #map1 {
        height: 480px;
    }

    .popular-explorer-card {
        padding: 20px;
    }

    .section-main-heading {
        font-size: 1.75rem;
    }
}

@media (max-width: 767.98px) {
    .state-wise-page {
        padding: 24px 0 40px;
    }

    #map1 {
        height: 380px;
    }

    .map-card-header {
        padding: 12px 16px;
    }

    .active-state-title {
        font-size: 1.25rem;
    }

    .popular-explorer-card {
        padding: 16px;
    }

    .section-main-heading {
        font-size: 1.5rem;
    }

    .popular-hubs-container {
        max-height: 200px;
    }
}

@media (max-width: 575.98px) {
    #map1 {
        height: 330px;
    }

    .map-floating-controls {
        top: 14px;
        right: 14px;
    }

    .map-ctrl-btn {
        width: 32px;
        height: 32px;
        font-size: 0.85rem;
    }
}