:root {
    --primary-color: #23A2A5;
    --primary-dark: #0D7576;
    --secondary-color: #0D7576;
    --accent-yellow: #FBC831;
    --accent-pink: #F7A782;
    --danger-color: #ef4444;
    --warning-color: #FBC831;
    --background: #f9fafb;
    --surface: #ffffff;
    --text-primary: #111827;
    --text-secondary: #6b7280;
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: var(--background);
    color: var(--text-primary);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Navbar */
.navbar {
    background: linear-gradient(135deg, var(--primary-dark) 0%, #0a5a5c 100%);
    color: white;
    padding: 0.75rem 0;
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.nav-brand {
    font-size: 1.1rem;
    font-weight: 600;
    color: white;
    flex-shrink: 0;
}

.nav-tabs {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    font-size: 0.875rem;
}

.nav-tab {
    color: white;
    text-decoration: none;
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    transition: background-color 0.2s;
    white-space: nowrap;
}

.nav-tab:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.nav-tab.active {
    background-color: rgba(255, 255, 255, 0.2);
}

/* Dropdown */
.dropdown {
    position: relative;
}

.dropdown-toggle {
    color: white;
    text-decoration: none;
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    transition: background-color 0.2s;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    background: none;
    border: none;
    font-size: 0.875rem;
    font-family: inherit;
}

.dropdown-toggle:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.dropdown-arrow {
    font-size: 0.7rem;
    transition: transform 0.2s;
}

.dropdown.active .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    border-radius: 0.375rem;
    box-shadow: var(--shadow-lg);
    min-width: 200px;
    margin-top: 0.5rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s;
    z-index: 1002;
}

.dropdown.active .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: block;
    padding: 0.625rem 1rem;
    color: var(--text-primary);
    text-decoration: none;
    transition: background-color 0.2s;
    font-size: 0.875rem;
}

.dropdown-item:first-child {
    border-radius: 0.375rem 0.375rem 0 0;
}

.dropdown-item:last-child {
    border-radius: 0 0 0.375rem 0.375rem;
}

.dropdown-item:hover {
    background-color: var(--background);
}

/* Admin Login Button */
.admin-login-btn {
    background-color: white;
    color: var(--primary-color);
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
    font-size: 0.875rem;
    font-family: inherit;
}

.admin-login-btn:hover {
    background-color: rgba(255, 255, 255, 0.9);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

/* Language Toggle Button */
.lang-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    padding: 6px 12px;
    cursor: pointer;
    font-size: 0.8rem;
    color: white;
    transition: all 0.2s ease;
    font-family: inherit;
    margin-left: 0.5rem;
}

.lang-toggle:hover {
    background: rgba(255, 255, 255, 0.25);
}

.lang-toggle .lang-separator {
    opacity: 0.5;
}

.lang-toggle .lang-en,
.lang-toggle .lang-kn {
    opacity: 0.6;
    transition: opacity 0.2s ease;
}

.lang-toggle .lang-en.active,
.lang-toggle .lang-kn.active {
    opacity: 1;
    font-weight: 600;
}

/* Kannada font adjustment */
[data-lang="kn"] .nav-brand,
[data-lang="kn"] .hero-title,
[data-lang="kn"] .hero-subtitle,
[data-lang="kn"] .section-title,
[data-lang="kn"] h1,
[data-lang="kn"] h2,
[data-lang="kn"] h3 {
    line-height: 1.4;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 0.5rem;
    gap: 0.25rem;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background-color: white;
    border-radius: 3px;
    transition: all 0.3s;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}
/* Hero Section */
.hero {
    background: var(--accent-yellow);
    color: var(--text-primary);
    padding: 3rem 0;
    text-align: center;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.hero-subtitle {
    font-size: 1.25rem;
    opacity: 0.8;
    margin-bottom: 2rem;
    color: var(--primary-dark);
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.stat-card {
    background: var(--primary-color); /* Teal #23A2A5 */
    color: white;
    padding: 1.5rem;
    border-radius: 0.5rem;
    box-shadow: var(--shadow-md);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.875rem;
    opacity: 0.9;
}

/* Features Section */
.features {
    padding: 3rem 0;
    background: var(--background);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.feature-card {
    background: var(--surface);
    padding: 2rem;
    border-radius: 0.5rem;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s, box-shadow 0.2s;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.feature-card p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Section */
.section {
    padding: 2rem 0;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stats-card {
    background: var(--surface);
    padding: 1.5rem;
    border-radius: 0.5rem;
    box-shadow: var(--shadow-sm);
    border-left: 4px solid var(--primary-color);
}

.stats-card h3 {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.stats-card .value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* Table */
.table-container {
    background: var(--surface);
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    background-color: var(--background);
}

th {
    text-align: left;
    padding: 1rem;
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

td {
    padding: 1rem;
    border-top: 1px solid var(--border-color);
}

tbody tr {
    transition: background-color 0.2s;
}

tbody tr:hover {
    background-color: var(--background);
}

thead tr:hover {
    background-color: var(--background);
}

.corp-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.corp-link:hover {
    text-decoration: underline;
}

/* Rank Badges */
.rank-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    font-weight: 700;
    font-size: 0.875rem;
}

.rank-badge.gold {
    background-color: #fbbf24;
    color: white;
}

.rank-badge.silver {
    background-color: #94a3b8;
    color: white;
}

.rank-badge.bronze {
    background-color: #c2410c;
    color: white;
}

/* Metrics */
.metric-good {
    color: var(--secondary-color);
    font-weight: 600;
}

.metric-medium {
    color: var(--warning-color);
    font-weight: 600;
}

.metric-poor {
    color: var(--danger-color);
    font-weight: 600;
}

/* Corporation Header */
.corp-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 2rem 0;
}

.corp-header h1 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

/* Commissioner Info */
.commissioner-info {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 2rem;
    align-items: center;
}

.commissioner-photo {
    width: 120px;
    height: 120px;
}

.placeholder-photo {
    width: 100%;
    height: 100%;
}

.commissioner-details h2 {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.commissioner-title {
    font-size: 1rem;
    opacity: 0.9;
    margin-bottom: 1rem;
}

.contact-methods {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.contact-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    text-decoration: none;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    transition: background-color 0.2s;
}

.contact-btn:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

.contact-btn .icon {
    font-size: 1.25rem;
}

/* Dashboard Section */
.dashboard-section {
    padding: 2rem 0;
}

/* Map */
.map-container {
    background: var(--surface);
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    margin-top: 1.5rem;
}

#map {
    height: 500px;
    width: 100%;
}

/* Floating Action Buttons */
.floating-buttons {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    z-index: 999;
}

.floating-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    transition: all 0.2s;
    border: none;
    color: white;
}

.floating-btn:hover {
    transform: scale(1.1);
}

.complaint-btn {
    background-color: var(--primary-color);
}

.whatsapp-btn {
    background: #25D366;
}

.telegram-btn {
    background: #0088cc;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 0.5rem;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.25rem;
}

.modal-close:hover {
    background-color: var(--background);
}

.modal-body {
    padding: 1.5rem;
}

/* Form */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-size: 0.875rem;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 0.625rem 0.875rem;
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-family: inherit;
    transition: border-color 0.2s;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
}

.form-file {
    width: 100%;
    padding: 0.625rem 0.875rem;
    border: 2px dashed var(--border-color);
    border-radius: 0.375rem;
    cursor: pointer;
    text-align: center;
    transition: border-color 0.2s;
}

.form-file:hover {
    border-color: var(--primary-color);
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.375rem;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.875rem;
    transition: background-color 0.2s;
    width: 100%;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
}

/* Location Picker Styles */
.location-picker {
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 0.75rem;
    background: #f8fafc;
}

.location-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}

.btn-location {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-location:hover {
    background: var(--primary-dark);
}

.btn-location:disabled {
    background: #94a3b8;
    cursor: not-allowed;
}

.btn-location svg {
    flex-shrink: 0;
}

.location-status {
    font-size: 0.8rem;
    color: #64748b;
}

.location-status.success {
    color: #16a34a;
}

.location-status.error {
    color: #dc2626;
}

.location-map {
    height: 200px;
    border-radius: 0.375rem;
    background: #e2e8f0;
    position: relative;
    overflow: hidden;
}

.location-map .leaflet-container {
    height: 100%;
    border-radius: 0.375rem;
}

.location-coords {
    margin-top: 0.5rem;
    padding: 0.375rem 0.5rem;
    background: white;
    border-radius: 0.25rem;
    font-size: 0.8rem;
    color: #475569;
}

.location-coords small {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* Map marker pulse animation */
.location-marker-pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* Admin Login Modal */
.login-form {
    max-width: 400px;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-title {
        font-size: 1.75rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .commissioner-info {
        grid-template-columns: 1fr;
        text-align: center;
        justify-items: center;
    }
    
    .hamburger {
        display: flex;
    }
    
    .nav-tabs {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--primary-color);
        flex-direction: column;
        padding: 1rem;
        box-shadow: var(--shadow-md);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        z-index: 1001;
    }
    
    .nav-tabs.active {
        max-height: 400px;
    }
    
    .dropdown {
        width: 100%;
    }
    
    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        margin-top: 0.5rem;
        background: rgba(255, 255, 255, 0.1);
        border-radius: 0.5rem;
        width: 100%;
    }
    
    .dropdown.active .dropdown-menu {
        display: block;
    }
    
    .dropdown-item {
        color: white;
        padding: 0.75rem 1rem;
    }
    
    .dropdown-item:hover {
        background: rgba(255, 255, 255, 0.15);
    }
    
    .navbar .container {
        position: relative;
    }
    
    table {
        font-size: 0.875rem;
    }
    
    th, td {
        padding: 0.5rem;
    }
    
    .floating-buttons {
        bottom: 1rem;
        right: 1rem;
    }
    
    .floating-btn {
        width: 48px;
        height: 48px;
        font-size: 1.25rem;
    }
}

/* Insights Section Styles */
.insights-section {
    background: linear-gradient(135deg, #f8f9ff 0%, #f0f4ff 100%);
    padding: 4rem 0;
    margin: 2rem 0;
}

.insights-header {
    text-align: center;
    margin-bottom: 3rem;
}

.insights-subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-top: 0.5rem;
}

.insights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.insight-card {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 2px solid transparent;
}

.insight-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.insight-card.highlight-card {
    border-color: #4f46e5;
    background: linear-gradient(135deg, #ffffff 0%, #f3f4ff 100%);
}

.insight-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}

.insight-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.insight-stat {
    font-size: 2.5rem;
    font-weight: 700;
    color: #4f46e5;
    margin: 0.5rem 0;
    line-height: 1;
}

.insight-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.insight-trend {
    display: inline-block;
    padding: 0.4rem 0.8rem;
    background: #e0e7ff;
    color: #4338ca;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.insight-trend.positive {
    background: #dcfce7;
    color: #15803d;
}

/* Top Issues Mini List */
.top-issues-mini {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1rem;
}

.mini-issue {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: #f8f9fa;
    border-radius: 8px;
    transition: background 0.2s ease;
}

.mini-issue:hover {
    background: #e9ecef;
}

.mini-rank {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #4f46e5;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.mini-label {
    flex: 1;
    font-weight: 500;
    color: var(--text-primary);
}

.mini-percent {
    font-weight: 600;
    color: #4f46e5;
    font-size: 0.95rem;
}

/* Data Attribution */
.data-attribution {
    margin-top: 2.5rem;
    padding: 1.5rem;
    background: white;
    border-radius: 12px;
    border-left: 4px solid #4f46e5;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.data-attribution p {
    margin: 0.5rem 0;
    color: var(--text-secondary);
}

.data-attribution strong {
    color: var(--text-primary);
}

.data-attribution a {
    color: #4f46e5;
    text-decoration: none;
    font-weight: 500;
}

.data-attribution a:hover {
    text-decoration: underline;
}

.data-attribution .text-muted {
    font-style: italic;
}

.data-attribution .small {
    font-size: 0.9rem;
}

/* Charts Section */
.charts-section {
    background: #f8f9fa;
    padding: 3rem 0;
    margin: 2rem 0;
}

.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.chart-container {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.chart-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #e5e7eb;
}

.chart-canvas {
    height: 300px;
    position: relative;
}

/* Top Issues List for Corporation Pages */
#topIssuesContainer {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.issue-card {
    background: white;
    padding: 1.25rem;
    border-radius: 10px;
    border-left: 4px solid #4f46e5;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.issue-card:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.issue-rank {
    display: inline-block;
    width: 32px;
    height: 32px;
    background: #4f46e5;
    color: white;
    border-radius: 50%;
    text-align: center;
    line-height: 32px;
    font-weight: 600;
    margin-right: 0.75rem;
}

.issue-category {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1.05rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .insights-grid {
        grid-template-columns: 1fr;
    }
    
    .charts-grid {
        grid-template-columns: 1fr;
    }
    
    .insight-stat {
        font-size: 2rem;
    }
    
    .chart-canvas {
        height: 250px;
    }
}

@media (max-width: 480px) {
    .insights-section {
        padding: 2rem 0;
    }
    
    .insight-card {
        padding: 1.5rem;
    }
    
    .insight-icon {
        font-size: 2.5rem;
    }
}

/* Corporation Comparison Styles */
.comparison-controls {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.checkbox-card {
    display: block;
    cursor: pointer;
    position: relative;
}

.checkbox-card input[type="checkbox"] {
    position: absolute;
    opacity: 0;
}

.checkbox-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.checkbox-card input:checked + .checkbox-content {
    border-color: currentColor;
    background: rgba(0, 0, 0, 0.02);
}

.checkbox-card:hover .checkbox-content {
    border-color: currentColor;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.corp-name {
    font-weight: 600;
    font-size: 1rem;
}

.corp-color {
    width: 20px;
    height: 20px;
    border-radius: 50%;
}

/* Metrics Comparison Grid */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.metric-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.metric-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.metric {
    text-align: center;
}

.metric-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.metric-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
}

.metric-value.small {
    font-size: 1.25rem;
}

/* Issues Comparison Grid */
.issues-comparison-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.issues-compare-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border-left: 4px solid;
}

.issue-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f3f4f6;
}

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

.issue-rank {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 0.875rem;
    flex-shrink: 0;
}

.issue-details {
    flex: 1;
}

.issue-name {
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.issue-stats {
    display: flex;
    justify-content: space-between;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.issue-percent {
    font-weight: 600;
    color: var(--text-primary);
}

/* Rankings Table Enhancements */
.rank-badge {
    display: inline-block;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    color: white;
    text-align: center;
    line-height: 32px;
    font-weight: 700;
}

.progress-cell {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.progress-bar-mini {
    flex: 1;
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill-mini {
    height: 100%;
    transition: width 0.3s ease;
}

.progress-label {
    font-weight: 600;
    min-width: 50px;
    text-align: right;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .checkbox-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .metrics-grid {
        grid-template-columns: 1fr;
    }
    
    .issues-comparison-grid {
        grid-template-columns: 1fr;
    }
    
    .metric-value {
        font-size: 1.5rem;
    }
}

/* Brand Logo Styling */
.brand-logo {
    height: 40px;
    width: auto;
    margin-right: 12px;
    vertical-align: middle;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .brand-logo {
        height: 32px;
        margin-right: 8px;
    }
    
    .nav-brand {
        font-size: 0.95rem;
    }
}

/* Enhanced Dropdown - Add hover support */
.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-toggle {
    cursor: pointer;
    user-select: none;
}

.dropdown-toggle:hover {
    opacity: 0.9;
}

/* Footer Styles */
.site-footer {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    color: white;
    padding: 3rem 0 1.5rem;
    margin-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    color: #60a5fa;
    font-size: 1.1rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: #cbd5e1;
    text-decoration: none;
    transition: all 0.2s ease;
    display: inline-block;
}

.footer-links a:hover {
    color: #60a5fa;
    transform: translateX(4px);
}

.footer-about {
    line-height: 1.6;
    color: #cbd5e1;
}

.footer-logo {
    height: 60px;
    width: auto;
    margin-bottom: 1rem;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1.5rem;
    text-align: center;
    color: #94a3b8;
    font-size: 0.9rem;
}

.footer-bottom a {
    color: #60a5fa;
    text-decoration: none;
}

.footer-bottom a:hover {
    text-decoration: underline;
}

/* Mobile Footer */
@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .site-footer {
        padding: 2rem 0 1rem;
    }
}

/* Focus Areas Stat Strip */
.focus-areas-strip {
    margin-top: 3rem;
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.strip-title {
    text-align: center;
    font-size: 1.5rem;
    margin-bottom: 2rem;
    color: var(--text-primary);
    font-weight: 700;
}

.stat-strip {
    display: grid;
    gap: 1.5rem;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.stat-item:hover {
    transform: translateX(8px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.stat-rank {
    font-size: 1.75rem;
    font-weight: 800;
    color: white;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-content {
    flex: 1;
}

.stat-label {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.stat-bar {
    height: 12px;
    background: #e5e7eb;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.stat-fill {
    height: 100%;
    transition: width 0.8s ease;
    border-radius: 6px;
}

.stat-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.stat-count {
    font-size: 0.875rem;
    font-weight: 400;
    color: var(--text-secondary);
    margin-left: 0.5rem;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .focus-areas-strip {
        padding: 1.5rem;
    }
    
    .strip-title {
        font-size: 1.25rem;
        margin-bottom: 1.5rem;
    }
    
    .stat-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .stat-rank {
        width: 40px;
        height: 40px;
        font-size: 1.5rem;
    }
    
    .stat-label {
        font-size: 1rem;
    }
    
    .stat-value {
        font-size: 1.1rem;
    }
    
    .stat-count {
        display: block;
        margin-left: 0;
        margin-top: 0.25rem;
    }
}

/* Contact Section Styles */
.contact-section {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    padding: 3rem 0;
    margin-top: 3rem;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.contact-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.contact-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.contact-card h3 {
    color: var(--primary-color);
    font-size: 1.25rem;
    margin-bottom: 1rem;
    font-weight: 700;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.5rem;
}

.contact-info {
    margin-bottom: 1.5rem;
}

.contact-info:last-child {
    margin-bottom: 0;
}

.contact-label {
    font-weight: 600;
    color: var(--text-primary);
    display: block;
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
}

.contact-value {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

.contact-value a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

.contact-value a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

.contact-icon {
    display: inline-block;
    width: 20px;
    text-align: center;
    margin-right: 8px;
}

.office-address {
    background: #f1f5f9;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    border-left: 4px solid var(--primary-color);
}

.office-address h3 {
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.office-address p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

.control-room-box {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    text-align: center;
}

.control-room-box h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    font-weight: 700;
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
    padding-bottom: 0.5rem;
}

.control-room-numbers {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}

.control-number {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 1.1rem;
    font-weight: 600;
    backdrop-filter: blur(10px);
}

.contact-dept-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.contact-dept-item {
    padding: 0.75rem 0;
    border-bottom: 1px solid #e5e7eb;
}

.contact-dept-item:last-child {
    border-bottom: none;
}

.dept-name {
    font-weight: 600;
    color: var(--text-primary);
    display: block;
    margin-bottom: 0.25rem;
}

.dept-person {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.dept-phone {
    color: var(--primary-color);
    text-decoration: none;
    margin-left: 0.5rem;
}

.dept-phone:hover {
    text-decoration: underline;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .contact-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-section {
        padding: 2rem 0;
    }
    
    .control-room-numbers {
        flex-direction: column;
    }
    
    .control-number {
        width: 100%;
    }
}
/* Top Issues Section Styles */
.top-issues-section {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    padding: 3rem 0;
    margin-top: 3rem;
}

.issues-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

.issues-main {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.issues-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.issue-item {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.issue-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.issue-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.issue-rank {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.25rem;
    font-weight: 700;
}

.rank-badge {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 700;
}

.rank-1 { background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%); color: white; }
.rank-2 { background: linear-gradient(135deg, #94a3b8 0%, #64748b 100%); color: white; }
.rank-3 { background: linear-gradient(135deg, #fb923c 0%, #ea580c 100%); color: white; }

.issue-percentage {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
}

.issue-name {
    color: var(--text-primary);
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.issue-count {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.issue-bar {
    width: 100%;
    height: 12px;
    background: #e5e7eb;
    border-radius: 6px;
    overflow: hidden;
    position: relative;
}

.issue-progress {
    height: 100%;
    border-radius: 6px;
    transition: width 1s ease-out;
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--secondary-color) 100%);
}

.insights-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.insights-card h3 {
    color: var(--primary-color);
    font-size: 1.25rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.insight-item {
    padding: 1rem;
    margin-bottom: 1rem;
    border-left: 4px solid var(--primary-color);
    background: #f8fafc;
    border-radius: 4px;
}

.insight-item:last-child {
    margin-bottom: 0;
}

.insight-label {
    font-weight: 600;
    color: var(--text-primary);
    display: block;
    margin-bottom: 0.25rem;
}

.insight-value {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

.comparison-card {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.comparison-card h4 {
    font-size: 1rem;
    margin-bottom: 0.75rem;
    opacity: 0.9;
}

.comparison-value {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.comparison-label {
    font-size: 0.85rem;
    opacity: 0.8;
}

.recommendations-card {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.recommendations-card h4 {
    font-size: 1rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.recommendation-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.recommendation-list li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
    font-size: 0.9rem;
    line-height: 1.5;
}

.recommendation-list li:before {
    content: "✓";
    position: absolute;
    left: 0;
    font-weight: 700;
}

/* Mobile responsive */
@media (max-width: 968px) {
    .issues-grid {
        grid-template-columns: 1fr;
    }
    
    .issue-percentage {
        font-size: 1.5rem;
    }
    
    .comparison-value {
        font-size: 1.5rem;
    }
}
/* Top Issues Section - Compact Version */
.top-issues-compact {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    margin-bottom: 2rem;
}

.top-issues-compact h3 {
    color: var(--primary-color);
    font-size: 1.25rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.issues-compact-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.issue-compact-card {
    padding: 1rem;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: 8px;
    transition: all 0.2s ease;
}

.issue-compact-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.issue-compact-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.rank-badge-compact {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

.issue-compact-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    flex: 1;
}

.issue-compact-percentage {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1;
}

.issue-compact-count {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

.issue-compact-bar {
    width: 100%;
    height: 6px;
    background: #e5e7eb;
    border-radius: 3px;
    overflow: hidden;
    margin-top: 0.5rem;
}

.issue-compact-progress {
    height: 100%;
    border-radius: 3px;
    transition: width 1s ease-out;
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--secondary-color) 100%);
}

.insights-compact {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
}

.insight-compact-item {
    text-align: center;
}

.insight-compact-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    display: block;
    margin-bottom: 0.25rem;
}

.insight-compact-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* Mobile responsive */
@media (max-width: 968px) {
    .issues-compact-grid {
        grid-template-columns: 1fr;
    }
    
    .insights-compact {
        grid-template-columns: 1fr;
    }
}

.rank-badge-compact.rank-1 { 
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%); 
    color: white; 
}

.rank-badge-compact.rank-2 { 
    background: linear-gradient(135deg, #94a3b8 0%, #64748b 100%); 
    color: white; 
}

.rank-badge-compact.rank-3 {
    background: linear-gradient(135deg, #fb923c 0%, #ea580c 100%);
    color: white;
}

/* =====================================================
   GEOCODING SUGGESTIONS DROPDOWN
   ===================================================== */
.geocode-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-top: none;
    border-radius: 0 0 0.375rem 0.375rem;
    box-shadow: var(--shadow-lg);
    max-height: 200px;
    overflow-y: auto;
    z-index: 1001;
}

.geocode-suggestion-item {
    padding: 0.625rem 0.875rem;
    cursor: pointer;
    border-bottom: 1px solid var(--background);
    font-size: 0.875rem;
    color: var(--text-primary);
    transition: background-color 0.15s ease;
}

.geocode-suggestion-item:hover {
    background-color: var(--background);
}

.geocode-suggestion-item:last-child {
    border-bottom: none;
}

/* =====================================================
   LOCATION STATUS STATES (BOUNDARY VALIDATION)
   ===================================================== */
.location-status {
    font-size: 0.75rem;
    margin-left: 0.5rem;
    transition: color 0.2s ease;
}

.location-status.success {
    color: #22c55e;
    font-weight: 500;
}

.location-status.error {
    color: var(--danger-color);
    font-weight: 500;
    line-height: 1.4;
}

.location-status.warning {
    color: #f59e0b;
    font-weight: 500;
}
