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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
}

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

/* Header */
.header {
    background: linear-gradient(135deg, #1e3c72, #2a5298);
    color: white;
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

/* Transparent navbar only on homepage */
.homepage .header {
    background: transparent !important;
    box-shadow: none !important;
}

.homepage .header.scrolled {
    background: rgba(30, 60, 114, 0.95) !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1) !important;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo {
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 50%;
}

.brand-text {
    font-size: 1.5rem;
    font-weight: bold;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-menu a {
    color: white;
    text-decoration: none;
    transition: color 0.3s;
}

.nav-menu a:hover {
    color: #ffd700;
}

.btn-admin {
    background: #ff6b6b;
    padding: 8px 16px;
    border-radius: 5px;
    font-weight: bold;
}

/* Hero Section */
.hero {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    overflow: hidden;
    background: linear-gradient(135deg, #1e3c72, #2a5298);
}

.hero-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    filter: none;
}

.hero-overlay {
    display: none;
}

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

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

.emergency-number {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 1rem 1.5rem;
    border-radius: 30px;
    backdrop-filter: blur(10px);
    text-decoration: none;
    color: white;
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 215, 0, 0.3);
}

.emergency-number:hover {
    background: rgba(255, 215, 0, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    border-color: #ffd700;
}

.emergency-number i {
    font-size: 1.5rem;
    color: #ffd700;
}

.emergency-number span {
    font-size: 2rem;
    font-weight: bold;
    color: white;
}

/* WhatsApp Widget */
.whatsapp-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background: #25d366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
    z-index: 1000;
    transition: all 0.3s ease;
    cursor: pointer;
}

.whatsapp-widget:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.6);
}

.whatsapp-widget i {
    color: white;
    font-size: 24px;
}

/* Contact Popup */
.contact-popup {
    position: fixed;
    bottom: 90px;
    right: 20px;
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.contact-popup.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.contact-option {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    text-decoration: none;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.contact-option:hover {
    transform: scale(1.1);
}

.contact-option i {
    font-size: 24px;
    color: white;
}

.call-option {
    background: #e74c3c;
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.4);
}

.call-option:hover {
    box-shadow: 0 6px 20px rgba(231, 76, 60, 0.6);
}

.whatsapp-option {
    background: #25d366;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
}

.whatsapp-option:hover {
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.6);
}

/* SIP Widget Popup */
.sip-widget-popup {
    position: fixed;
    bottom: 90px;
    right: 20px;
    z-index: 1001;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    width: 280px;
    max-height: 400px;
    overflow: hidden;
}

.sip-widget-content {
    display: flex;
    flex-direction: column;
}

.sip-header {
    background: #28a745;
    color: white;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sip-header h4 {
    margin: 0;
    font-size: 16px;
}

.close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 0;
    width: 25px;
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sip-body {
    padding: 15px;
}

.sip-body input, .sip-body select {
    width: 100%;
    padding: 8px;
    margin: 5px 0;
    border: 1px solid #ddd;
    border-radius: 5px;
    box-sizing: border-box;
    font-size: 14px;
}

.auto-config-btn, .register-btn, .call-btn, .hangup-btn, .admin-btn, .config-btn {
    width: 100%;
    padding: 10px;
    margin: 5px 0;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    font-size: 14px;
}

.admin-btn {
    background: #6c757d;
    color: white;
}

.config-btn {
    background: #ffc107;
    color: #212529;
}

.auto-config-btn {
    background: #17a2b8;
    color: white;
}

.register-btn {
    background: #28a745;
    color: white;
}

.call-btn {
    background: #007bff;
    color: white;
}

.hangup-btn {
    background: #dc3545;
    color: white;
}

.emergency-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 5px;
    margin: 10px 0;
}

.emergency-btn {
    padding: 8px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    font-size: 12px;
    color: white;
}

.emergency-btn.red { background: #dc3545; }
.emergency-btn.blue { background: #007bff; }
.emergency-btn.orange { background: #fd7e14; }
.emergency-btn.green { background: #28a745; }

#sip-status-mini {
    text-align: center;
    padding: 8px;
    background: #f8f9fa;
    border-radius: 5px;
    margin-bottom: 10px;
    font-weight: bold;
    font-size: 12px;
}

/* Quick Stats */
.quick-stats {
    background: white;
    padding: 3rem 0;
    box-shadow: 0 -5px 15px rgba(0,0,0,0.1);
}

.stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

.quick-stats .stat-item {
    text-align: center;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 10px;
    border-left: 4px solid #1e3c72;
}

.quick-stats .stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: #1e3c72;
    margin-bottom: 0.5rem;
}

.quick-stats .stat-label {
    color: #666;
    font-weight: 600;
}

/* About Section */
.about-section {
    padding: 5rem 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-content h2 {
    font-size: 2.5rem;
    color: #1e3c72;
    margin-bottom: 1.5rem;
}

.about-content p {
    font-size: 1.1rem;
    line-height: 1.7;
    color: #555;
    margin-bottom: 2rem;
}

.about-features {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.about-feature {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.about-feature i {
    font-size: 1.5rem;
    color: #1e3c72;
    margin-top: 0.25rem;
}

.about-feature h4 {
    margin-bottom: 0.5rem;
    color: #333;
}

.about-feature p {
    margin: 0;
    color: #666;
    font-size: 0.95rem;
}

.about-image {
    display: flex;
    justify-content: center;
}

.image-placeholder {
    background: linear-gradient(135deg, #1e3c72, #2a5298);
    color: white;
    padding: 3rem;
    border-radius: 15px;
    text-align: center;
    width: 100%;
    max-width: 300px;
}

.image-placeholder i {
    font-size: 4rem;
    margin-bottom: 1rem;
    color: #ffd700;
}

.image-placeholder p {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

/* Services Section */
.services {
    padding: 5rem 0;
    background: #f8f9fa;
}

.services h2 {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2.5rem;
    color: #1e3c72;
}

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

.service-card {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.service-card i {
    font-size: 3rem;
    color: #1e3c72;
    margin-bottom: 1rem;
}

.service-card h3 {
    margin-bottom: 1rem;
    color: #333;
}

/* Statistics Section */
.statistics {
    padding: 5rem 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.statistics h2 {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2.8rem;
    color: #2c3e50;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

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

/* Call Statistics */
.call-stats-wrapper {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    margin-bottom: 2rem;
    border: 1px solid rgba(255,255,255,0.8);
}

.call-stats-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #f0f0f0;
}

.call-stats-header h3 {
    color: #2c3e50;
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
}

.sync-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: #666;
}

.sync-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #dc3545;
    animation: pulse 2s infinite;
}

.sync-dot.connected {
    background: #28a745;
}

/* Date Filter */
.date-filter {
    display: grid;
    grid-template-columns: 1fr 1fr auto auto;
    gap: 1rem;
    align-items: end;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: rgba(255,255,255,0.6);
    border-radius: 8px;
    border: 1px solid rgba(0,0,0,0.05);
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.25rem;
}

.filter-group input {
    padding: 0.75rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: border-color 0.3s;
    background: white;
}

.filter-group input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.filter-btn {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    height: fit-content;
}

.filter-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(39, 174, 96, 0.3);
}

.reset-btn {
    background: linear-gradient(135deg, #95a5a6, #bdc3c7);
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    height: fit-content;
}

.reset-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(149, 165, 166, 0.3);
}

/* Charts Section */
.charts-section {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.chart-wrapper {
    background: rgba(255,255,255,0.8);
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.05);
    border: 1px solid rgba(255,255,255,0.8);
    height: 200px;
    display: flex;
    flex-direction: column;
}

.chart-wrapper h4 {
    margin-bottom: 0.5rem;
    color: #2c3e50;
    text-align: center;
    font-size: 0.9rem;
    font-weight: 600;
}

.chart-wrapper canvas {
    flex: 1;
}

.call-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-top: 1rem;
}

.stat-card {
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
    border: none;
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100px;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.stat-card.primary {
    background: linear-gradient(135deg, #2c3e50, #3498db);
    color: white;
    border: none;
}

.stat-card.success {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: white;
    border: none;
}

.stat-card.warning {
    background: linear-gradient(135deg, #e67e22, #f39c12);
    color: white;
    border: none;
}

.stat-card.info {
    background: linear-gradient(135deg, #8e44ad, #9b59b6);
    color: white;
    border: none;
}

.stat-icon {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    display: block;
}

.stat-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
}

.stat-number {
    font-size: 1.8rem;
    font-weight: 700;
    line-height: 1;
    margin: 0;
}

.stat-label {
    font-size: 0.8rem;
    font-weight: 600;
    margin: 0;
}

.stat-period {
    font-size: 0.7rem;
    opacity: 0.8;
    margin: 0;
}



/* Contact Section */
.contact {
    padding: 5rem 0;
    background: #f8f9fa;
}

.contact h2 {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2.5rem;
    color: #1e3c72;
}

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

.contact-item {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.contact-item i {
    font-size: 2rem;
    color: #1e3c72;
    margin-bottom: 1rem;
}

/* Footer */
.footer {
    background: linear-gradient(135deg, #1e3c72, #2a5298);
    color: white;
    padding: 3rem 0 1rem;
    margin-top: 3rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    color: #ffd700;
    margin-bottom: 1rem;
    font-size: 1.2rem;
    font-weight: 600;
}

.footer-section p {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
    padding-left: 0;
}

.footer-contact p {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.footer-contact i {
    color: #ffd700;
    width: 16px;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: #ffd700;
    color: #1e3c72;
    transform: translateY(-2px);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 1rem;
    text-align: center;
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Admin Styles */
.admin-container {
    max-width: 1000px;
    margin: 100px auto 50px;
    padding: 0 20px;
}

.admin-header {
    background: linear-gradient(135deg, #1e3c72, #2a5298);
    color: white;
    padding: 2rem;
    border-radius: 10px;
    margin-bottom: 2rem;
    text-align: center;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.form-group input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
}

.btn {
    background: #1e3c72;
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.3s;
}

.btn:hover {
    background: #2a5298;
}

.btn-danger {
    background: #dc3545;
}

.btn-danger:hover {
    background: #c82333;
}

.table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 2rem;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.table th,
.table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.table th {
    background: #f8f9fa;
    font-weight: bold;
}

.table tr:hover {
    background: #f8f9fa;
}

/* Maps Styles */
.maps-container {
    max-width: 1200px;
    margin: 100px auto 50px;
    padding: 0 20px;
}

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

.status-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #dc3545;
}

.status-dot.active {
    background: #28a745;
    animation: pulse 2s infinite;
}

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

.maps-controls {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.maps-controls select {
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.maps-content {
    height: 70vh;
    margin-bottom: 2rem;
}

.map-container-full {
    width: 100%;
    height: 100%;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.incident-panel-bottom {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.incident-panel-bottom h3 {
    margin-bottom: 1rem;
    color: #1e3c72;
    text-align: center;
}

.incident-list-horizontal {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
}

.incident-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

.incident-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.incident-item.resolved {
    opacity: 0.7;
    background: #f8f9fa;
}

.incident-info {
    flex: 1;
}

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

.incident-type-badge {
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: bold;
    color: white;
}

.incident-type-badge.fire {
    background: #ff4757;
}

.incident-type-badge.medical {
    background: #2ed573;
}

.incident-type-badge.police {
    background: #3742fa;
}

.incident-type-badge.sar {
    background: #ffa502;
}

.incident-status-badge {
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: bold;
    text-transform: uppercase;
}

.incident-status-badge.active {
    background: #fee;
    color: #e74c3c;
}

.incident-status-badge.resolved {
    background: #efe;
    color: #27ae60;
}

.incident-info small {
    display: block;
    color: #666;
    font-size: 0.8rem;
}

.btn-small {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.2s;
}

.btn-small.active {
    background: #27ae60;
    color: white;
}

.btn-small.active:hover {
    background: #219a52;
}

.btn-small.resolved {
    background: #e74c3c;
    color: white;
}

.btn-small.resolved:hover {
    background: #c0392b;
}

/* Custom marker logo styles */
.incident-marker-logo {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid white;
    box-shadow: 0 3px 10px rgba(0,0,0,0.3);
    background: white;
    position: relative;
}

.incident-marker-logo.fire {
    border-color: #ff4757;
}

.incident-marker-logo.medical {
    border-color: #2ed573;
}

.incident-marker-logo.police {
    border-color: #3742fa;
}

.incident-marker-logo.sar {
    border-color: #ffa502;
}

.incident-marker-logo.resolved {
    opacity: 0.7;
    filter: grayscale(50%);
}

/* Detail markers for close zoom in maps */
.incident-detail-marker {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 4px solid white;
    box-shadow: 0 4px 15px rgba(0,0,0,0.4);
    font-size: 24px;
    animation: bounce 2s infinite;
}

.incident-detail-marker.fire {
    background: #ff4757;
}

.incident-detail-marker.medical {
    background: #2ed573;
}

.incident-detail-marker.police {
    background: #3742fa;
}

.incident-detail-marker.sar {
    background: #ffa502;
}

.incident-detail-marker.resolved {
    opacity: 0.7;
    filter: grayscale(30%);
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

.incident-marker-logo svg {
    width: 20px;
    height: 20px;
}

/* Popup styling */
.popup-content {
    font-family: 'Segoe UI', sans-serif;
    min-width: 200px;
}

.popup-content strong {
    color: #1e3c72;
    font-size: 1.1rem;
    display: block;
    margin-bottom: 0.5rem;
}

.popup-type {
    color: #666;
    font-weight: 500;
}

.popup-status {
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.9rem;
}

.popup-status.status-active {
    color: #e74c3c;
}

.popup-status.status-resolved {
    color: #27ae60;
}

.popup-time {
    color: #7f8c8d;
    font-size: 0.9rem;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: white;
    margin: 15% auto;
    padding: 2rem;
    border-radius: 10px;
    width: 90%;
    max-width: 500px;
    position: relative;
}

.close {
    position: absolute;
    right: 1rem;
    top: 1rem;
    font-size: 2rem;
    cursor: pointer;
    color: #999;
}

.close:hover {
    color: #333;
}

/* Home Maps Styles */
.maps-section {
    padding: 5rem 0;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
}

.maps-section h2 {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2.8rem;
    color: #2c3e50;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.maps-with-chart {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr auto;
    gap: 2rem;
    margin-bottom: 2rem;
}

.home-map-container-wrapper {
    grid-column: 1 / 2;
    grid-row: 1 / 3;
    height: 500px;
    position: relative;
}

.map-reset-btn {
    position: absolute;
    top: 75px;
    left: 14px;
    z-index: 999;
    background: white;
    border: 2px solid rgba(0,0,0,0.2);
    border-radius: 2px;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 1px 5px rgba(0,0,0,0.2);
    transition: background 0.2s ease;
    font-size: 0;
    line-height: 1;
    margin-top: -1px;
}

.map-reset-btn:hover {
    background: #f4f4f4;
}

.map-reset-btn i {
    color: #333;
    font-size: 14px;
}

.chart-panel {
    grid-column: 2 / 3;
    grid-row: 1 / 2;
    height: 240px;
    overflow: hidden;
}

.chart-container {
    height: 150px;
    position: relative;
    margin-bottom: 1rem;
    overflow: hidden;
}

.chart-container canvas {
    max-width: 100% !important;
    max-height: 100% !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: contain;
}

.stats-panel {
    grid-column: 2 / 3;
    grid-row: 2 / 3;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    padding: 1.5rem;
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
    border: 1px solid rgba(255,255,255,0.8);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.stats-panel .stats-summary {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

.stats-panel .stat-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    border-radius: 6px;
    background: #f8f9fa;
    border-left: 3px solid #ddd;
    font-size: 0.85rem;
}

.stats-panel .stat-number {
    font-size: 1.2rem;
    font-weight: bold;
}

.stats-panel .quick-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

.stats-panel .summary-item {
    text-align: center;
    padding: 0.5rem;
    border-radius: 6px;
    background: rgba(255,255,255,0.8);
    border: 1px solid #f0f0f0;
}

.stats-panel .summary-number {
    display: block;
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 0.25rem;
}

.stats-panel .summary-label {
    font-size: 0.8rem;
    color: #666;
}

.home-map-container-wrapper {
    height: 100%;
}

.home-map-container {
    width: 100%;
    height: 100%;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1), 0 5px 15px rgba(0,0,0,0.05);
    border: 2px solid rgba(255,255,255,0.8);
}

.leaflet-control-zoom {
    z-index: 0 !important;
}

.leaflet-control-zoom-in,
.leaflet-control-zoom-out {
    z-index: 0 !important;
}

.leaflet-control {
    z-index: 0 !important;
}

.chart-panel {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.08), 0 5px 15px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(255,255,255,0.8);
}

.chart-panel h3 {
    margin-bottom: 1rem;
    color: #1e3c72;
    text-align: center;
}

.chart-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.chart-legend {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 3px;
}

.legend-color.fire { background: #ff4757; }
.legend-color.accident { background: #e74c3c; }
.legend-color.tree { background: #27ae60; }
.legend-color.flood { background: #3498db; }
.legend-color.crime { background: #8e44ad; }
.legend-color.medical { background: #f39c12; }

.home-incident-panel {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.08), 0 5px 15px rgba(0,0,0,0.05);
    border: 1px solid rgba(255,255,255,0.8);
}

.home-incident-panel h3 {
    text-align: center;
    margin-bottom: 2rem;
    color: #1e3c72;
}

.incident-summary {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.08), 0 5px 15px rgba(0,0,0,0.05);
    margin-bottom: 2rem;
    border: 1px solid rgba(255,255,255,0.8);
}

.summary-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1rem;
}

.summary-item {
    text-align: center;
    padding: 0.75rem;
    border-radius: 6px;
    background: #f8f9fa;
}

.summary-number {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 0.25rem;
}

.summary-label {
    font-size: 0.8rem;
    color: #666;
}

.summary-item.active .summary-number {
    color: #e74c3c;
}

.summary-item.resolved .summary-number {
    color: #27ae60;
}

.summary-item.total .summary-number {
    color: #1e3c72;
}

.recent-activity {
    border-top: 1px solid #eee;
    padding-top: 1rem;
}

.recent-activity h4 {
    margin-bottom: 0.5rem;
    color: #333;
    font-size: 0.9rem;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0;
    font-size: 0.8rem;
    color: #666;
}

.activity-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #ddd;
}

.activity-dot.fire { background: #ff4757; }
.activity-dot.accident { background: #e74c3c; }
.activity-dot.tree { background: #27ae60; }
.activity-dot.flood { background: #3498db; }
.activity-dot.crime { background: #8e44ad; }
.activity-dot.medical { background: #f39c12; }



/* Incident Statistics */
.incident-statistics {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    padding: 2.5rem;
    margin-top: 2rem;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.08), 0 5px 15px rgba(0,0,0,0.05);
    border: 1px solid rgba(255,255,255,0.8);
}

.incident-statistics h3 {
    text-align: center;
    margin-bottom: 1.5rem;
    color: #1e3c72;
}

/* Incident Filter */
.incident-filter {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr auto auto;
    gap: 1rem;
    align-items: end;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: rgba(255,255,255,0.8);
    border-radius: 12px;
    border: 1px solid rgba(0,0,0,0.05);
}

.incident-filter .filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.incident-filter .filter-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #2c3e50;
}

.incident-filter .filter-group select {
    padding: 0.75rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 0.9rem;
    background: white;
    transition: border-color 0.3s;
}

.incident-filter .filter-group select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.stats-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-radius: 8px;
    background: #f8f9fa;
    border-left: 4px solid #ddd;
}

.stat-item.fire {
    border-left-color: #ff4757;
}

.stat-item.medical {
    border-left-color: #2ed573;
}

.stat-item.police {
    border-left-color: #3742fa;
}

.stat-item.accident {
    border-left-color: #e74c3c;
}

.stat-item.tree {
    border-left-color: #27ae60;
}

.stat-item.flood {
    border-left-color: #3498db;
}

.stat-item.crime {
    border-left-color: #8e44ad;
}

.stat-item.medical {
    border-left-color: #f39c12;
}

/* Quick Summary */
.quick-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid #f0f0f0;
}

.summary-item {
    text-align: center;
    padding: 1rem;
    border-radius: 10px;
    background: rgba(255,255,255,0.8);
    border: 2px solid #f0f0f0;
    transition: transform 0.3s;
}

.summary-item:hover {
    transform: translateY(-3px);
}

.summary-item.active {
    border-color: #e74c3c;
    background: linear-gradient(135deg, #ffffff 0%, #fdf2f2 100%);
}

.summary-item.resolved {
    border-color: #27ae60;
    background: linear-gradient(135deg, #ffffff 0%, #eafaf1 100%);
}

.summary-item.total {
    border-color: #3498db;
    background: linear-gradient(135deg, #ffffff 0%, #ebf3fd 100%);
}

.summary-number {
    display: block;
    font-size: 1.8rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.summary-item.active .summary-number {
    color: #e74c3c;
}

.summary-item.resolved .summary-number {
    color: #27ae60;
}

.summary-item.total .summary-number {
    color: #3498db;
}

.summary-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #666;
}

/* Today Summary */
.today-summary {
    margin-top: 1.5rem;
    padding: 1rem;
    background: rgba(52, 152, 219, 0.1);
    border-radius: 8px;
    border-left: 4px solid #3498db;
}

.today-summary h4 {
    margin: 0 0 1rem 0;
    color: #2c3e50;
    font-size: 0.9rem;
    font-weight: 600;
}

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

.today-item {
    text-align: center;
    padding: 0.5rem;
    background: rgba(255,255,255,0.8);
    border-radius: 6px;
}

.today-number {
    display: block;
    font-size: 1.2rem;
    font-weight: bold;
    color: #3498db;
    margin-bottom: 0.25rem;
}

.today-label {
    font-size: 0.7rem;
    color: #666;
    font-weight: 500;
}

/* Last Update */
.last-update {
    font-size: 0.75rem;
    color: #666;
    margin-left: 1rem;
}

/* Stats Header */
.stats-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.stats-header h3 {
    margin: 0;
    color: #2c3e50;
}

.realtime-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: #666;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #27ae60;
    animation: pulse 2s infinite;
}

.incident-update {
    font-size: 0.75rem;
    color: #666;
}

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

.stat-icon {
    font-size: 2rem;
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-size: 1.5rem;
    font-weight: bold;
    color: #333;
}

.stat-label {
    font-size: 0.9rem;
    color: #666;
}

/* Home marker styles */
.home-incident-marker {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid white;
    box-shadow: 0 3px 10px rgba(0,0,0,0.3);
    background: white;
}

.home-incident-marker.fire {
    border-color: #ff4757;
}

.home-incident-marker.accident {
    border-color: #e74c3c;
}

.home-incident-marker.tree {
    border-color: #27ae60;
}

.home-incident-marker.flood {
    border-color: #3498db;
}

.home-incident-marker.crime {
    border-color: #8e44ad;
}

.home-incident-marker.medical {
    border-color: #f39c12;
}

/* Detail markers for close zoom */
.home-detail-marker {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid white;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
    font-size: 20px;
    animation: pulse 2s infinite;
}

.home-detail-marker.fire {
    background: #ff4757;
    border-color: #fff;
}

.home-detail-marker.accident {
    background: #e74c3c;
    border-color: #fff;
}

.home-detail-marker.tree {
    background: #27ae60;
    border-color: #fff;
}

.home-detail-marker.flood {
    background: #3498db;
    border-color: #fff;
}

.home-detail-marker.crime {
    background: #8e44ad;
    border-color: #fff;
}

.home-detail-marker.medical {
    background: #f39c12;
    border-color: #fff;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* API Styles */
.api-section {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    margin-bottom: 2rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.api-controls {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.api-status {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 5px;
    margin-top: 1rem;
}

.api-status p {
    margin: 0.25rem 0;
}

.api-config,
.mapping-config,
.sync-controls,
.webhook-config {
    display: grid;
    gap: 1rem;
}

.sync-info {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 5px;
    margin-top: 1rem;
}

.sync-info p {
    margin: 0.25rem 0;
}

.response-container {
    background: #f8f9fa;
    border-radius: 5px;
    padding: 1rem;
    max-height: 300px;
    overflow-y: auto;
}

.response-container pre {
    margin: 0;
    white-space: pre-wrap;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
}

.log-container {
    background: #f8f9fa;
    border-radius: 5px;
    padding: 1rem;
    max-height: 300px;
    overflow-y: auto;
}

.log-entry {
    display: flex;
    gap: 1rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
}

.log-time {
    color: #666;
    font-size: 0.8rem;
    min-width: 150px;
}

.log-message {
    flex: 1;
}

.webhook-endpoints {
    margin-top: 1rem;
}

.webhook-endpoints ul {
    list-style: none;
    padding: 0;
}

.webhook-endpoints li {
    padding: 0.5rem;
    background: #f8f9fa;
    margin: 0.25rem 0;
    border-radius: 3px;
}

.webhook-endpoints code {
    background: #e9ecef;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-menu {
        flex-direction: column;
        gap: 1rem;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .hero-video {
        object-position: center;
    }
    
    .emergency-number {
        flex-direction: column;
    }
    
    .services-grid,
    .stats-grid,
    .contact-grid {
        grid-template-columns: 1fr;
    }
    
    .maps-content {
        height: 50vh;
    }
    
    .incident-list-horizontal {
        grid-template-columns: 1fr;
    }
    
    .maps-controls {
        flex-direction: column;
    }
    
    .maps-with-chart {
        grid-template-columns: 1fr;
        height: auto;
    }
    
    .home-map-container-wrapper {
        height: 40vh;
    }
    
    .chart-panel {
        height: 300px;
    }
    
    .summary-stats {
        grid-template-columns: 1fr;
    }
    
    .call-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    

    
    .call-stats-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .date-filter {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .charts-section {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .chart-wrapper {
        height: 180px;
    }
    
    .call-stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .incident-filter {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .stats-summary {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .quick-summary {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .today-stats {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .stats-header {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
    
    .realtime-indicator {
        justify-content: center;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        text-align: center;
    }
    
    .social-links {
        justify-content: center;
    }

/* Weather Ticker */
.weather-ticker {
    background: linear-gradient(135deg, #74b9ff, #0984e3);
    color: white;
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border-radius: 25px;
    text-align: center;
    margin-bottom: 2rem;
}

.weather-content {
    white-space: nowrap;
}

.weather-item {
    font-weight: 500;
    white-space: nowrap;
}

/* Weather Center */
.weather-center {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    padding: 2rem 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.weather-display {
    font-size: 1.2rem;
    font-weight: 600;
    color: #2c3e50;
    background: white;
    padding: 1rem 2rem;
    border-radius: 50px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border: 2px solid rgba(116, 185, 255, 0.3);
    white-space: nowrap;
}
    
    .stats-summary {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .stat-item {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
    
    .api-controls {
        flex-direction: column;
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .hero-features {
        flex-direction: column;
        gap: 1rem;
    }
    
    .stats-row {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .about-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .about-features {
        gap: 1rem;
    }
}