/* Public Safety Live - Emergency Response Intelligence Platform */
:root {
    --primary-color: #dc2626;
    --secondary-color: #b91c1c;
    --accent-color: #f59e0b;
    --success-color: #059669;
    --warning-color: #d97706;
    --error-color: #dc2626;
    --dark-bg: #1f2937;
    --card-bg: #374151;
    --surface-bg: #4b5563;
    --text-primary: #f9fafb;
    --text-secondary: #e5e7eb;
    --text-muted: #d1d5db;
    --aptos-green: #00d4aa;
    --gradient-primary: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    --gradient-accent: linear-gradient(135deg, #f59e0b 0%, #dc2626 100%);
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.15);
    --shadow-xl: 0 20px 25px rgba(0,0,0,0.25);
}

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

body {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--dark-bg);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Header */
.header {
    background: var(--card-bg);
    border-bottom: 2px solid var(--primary-color);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.brand-section {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.brand-logo {
    width: 50px;
    height: 50px;
    background: var(--gradient-primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    box-shadow: var(--shadow-md);
}

.brand-name {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.brand-tagline {
    font-size: 0.85rem;
    color: var(--accent-color);
    font-weight: 600;
}

.header-nav {
    display: flex;
    gap: 2rem;
}

.nav-item {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.nav-item:hover {
    color: var(--accent-color);
}

.nav-item::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-color);
    transition: width 0.3s ease;
}

.nav-item:hover::after {
    width: 100%;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.emergency-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.status-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--success-color);
    animation: pulse 2s infinite;
}

.status-indicator.active {
    background: var(--success-color);
}

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

.aptos-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--aptos-green);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

/* Hero Section */
.hero {
    min-height: 80vh;
    display: flex;
    align-items: center;
    padding: 6rem 0;
    background: linear-gradient(135deg, var(--dark-bg) 0%, var(--card-bg) 100%);
}

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

.hero-content {
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
}

.alert-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(220, 38, 38, 0.1);
    color: var(--primary-color);
    padding: 1rem 1.5rem;
    border-radius: 25px;
    border: 1px solid rgba(220, 38, 38, 0.3);
    font-weight: 600;
    margin-bottom: 2rem;
    animation: alertPulse 3s ease-in-out infinite;
}

@keyframes alertPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 2rem;
    color: var(--text-primary);
}

.highlight {
    color: var(--accent-color);
}

.hero-description {
    font-size: 1.25rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 3rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.response-metrics {
    display: flex;
    justify-content: center;
    gap: 4rem;
}

.metric-item {
    text-align: center;
}

.metric-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--accent-color);
    font-family: 'JetBrains Mono', monospace;
    margin-bottom: 0.5rem;
}

.metric-label {
    color: var(--text-muted);
    font-weight: 500;
}

/* Services Section */
.services {
    padding: 6rem 0;
    background: var(--surface-bg);
}

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

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.section-header p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

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

.service-card {
    background: var(--card-bg);
    padding: 2.5rem;
    border-radius: 16px;
    border: 1px solid rgba(220, 38, 38, 0.2);
    transition: all 0.3s ease;
    text-align: center;
}

.service-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
    box-shadow: var(--shadow-lg);
}

.service-icon {
    width: 70px;
    height: 70px;
    background: var(--gradient-accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.8rem;
    margin: 0 auto 1.5rem;
}

.service-card h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

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

/* Response Section */
.response {
    padding: 6rem 0;
    background: var(--dark-bg);
}

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

.response-features {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.response-item {
    display: flex;
    gap: 2rem;
    padding: 2rem;
    background: var(--card-bg);
    border-radius: 16px;
    border: 1px solid rgba(220, 38, 38, 0.2);
    transition: all 0.3s ease;
}

.response-item:hover {
    transform: translateX(10px);
    border-color: var(--primary-color);
    box-shadow: var(--shadow-lg);
}

.response-icon {
    width: 60px;
    height: 60px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.response-content h4 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

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

/* Compact Chat Widget */
.chat-widget {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 350px;
    z-index: 1000;
    animation: slideInUp 1s ease-out 2s both;
}

@keyframes slideInUp {
    from { 
        transform: translateY(100px); 
        opacity: 0; 
    }
    to { 
        transform: translateY(0); 
        opacity: 1; 
    }
}

.widget-header {
    background: var(--gradient-primary);
    color: white;
    padding: 1rem;
    border-radius: 12px 12px 0 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
}

.widget-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.widget-avatar {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.widget-title {
    font-weight: 700;
    font-size: 1rem;
}

.widget-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    opacity: 0.9;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: var(--success-color);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.widget-toggle {
    background: none;
    border: none;
    color: white;
    font-size: 1rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.widget-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
}

.widget-body {
    background: var(--card-bg);
    border-radius: 0 0 12px 12px;
    border: 1px solid rgba(220, 38, 38, 0.3);
    border-top: none;
    max-height: 400px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.widget-body.collapsed {
    max-height: 0;
    border: none;
}

.widget-messages {
    padding: 1rem;
    background: var(--dark-bg);
    max-height: 200px;
    overflow-y: auto;
}

.message {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.message-avatar {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
    flex-shrink: 0;
}

.message-content {
    background: var(--card-bg);
    padding: 1rem;
    border-radius: 12px;
    flex: 1;
    border: 1px solid rgba(220, 38, 38, 0.2);
}

.message-content p {
    margin-bottom: 0.75rem;
    line-height: 1.6;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.message-content p:last-child {
    margin-bottom: 0;
}

.widget-input {
    padding: 1rem;
    background: var(--card-bg);
}

.emergency-actions {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.emergency-btn {
    background: rgba(220, 38, 38, 0.1);
    color: var(--primary-color);
    border: 1px solid rgba(220, 38, 38, 0.3);
    padding: 0.5rem 0.75rem;
    border-radius: 16px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    justify-content: center;
}

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

.input-container {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.widget-input-field {
    flex: 1;
    padding: 0.75rem;
    background: var(--dark-bg);
    border: 2px solid rgba(220, 38, 38, 0.3);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

.widget-input-field:focus {
    outline: none;
    border-color: var(--primary-color);
}

.widget-input-field::placeholder {
    color: var(--text-muted);
}

.widget-send {
    width: 40px;
    height: 40px;
    background: var(--gradient-primary);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.widget-send:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-md);
}

.widget-footer {
    text-align: center;
}

.security-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.security-note i {
    color: var(--aptos-green);
}

/* Contact Section */
.contact {
    padding: 6rem 0;
    background: var(--surface-bg);
}

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

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

.contact-card {
    background: var(--card-bg);
    padding: 2.5rem;
    border-radius: 16px;
    border: 1px solid rgba(220, 38, 38, 0.2);
    text-align: center;
    transition: all 0.3s ease;
}

.contact-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
    box-shadow: var(--shadow-lg);
}

.contact-card.emergency {
    border-color: var(--primary-color);
    background: rgba(220, 38, 38, 0.05);
}

.contact-icon {
    width: 60px;
    height: 60px;
    background: var(--gradient-accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    margin: 0 auto 1.5rem;
}

.contact-card.emergency .contact-icon {
    background: var(--gradient-primary);
    animation: emergencyPulse 2s ease-in-out infinite;
}

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

.contact-card h4 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.contact-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    font-family: 'JetBrains Mono', monospace;
    margin-bottom: 0.5rem;
}

.contact-email {
    font-size: 1.1rem;
    color: var(--accent-color);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.contact-address {
    font-size: 1.1rem;
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.contact-card p:last-child {
    color: var(--text-muted);
}

/* Footer */
.footer {
    background: var(--card-bg);
    border-top: 2px solid var(--primary-color);
    padding: 4rem 0 2rem;
}

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

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 2rem;
}

.footer-brand {
    max-width: 400px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.footer-logo i {
    font-size: 2rem;
    color: var(--primary-color);
}

.footer-logo span {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.footer-brand p {
    color: var(--text-secondary);
    line-height: 1.7;
}

.footer-column h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.footer-column ul {
    list-style: none;
}

.footer-column ul li {
    margin-bottom: 0.75rem;
}

.footer-column ul li a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-column ul li a:hover {
    color: var(--accent-color);
}

.footer-bottom {
    border-top: 1px solid rgba(220, 38, 38, 0.2);
    padding-top: 2rem;
}

.footer-bottom-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-bottom p {
    color: var(--text-muted);
    margin: 0;
}

.footer-security {
    display: flex;
    gap: 1rem;
}

.security-badge {
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }
    
    .header-nav {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .response-metrics {
        flex-direction: column;
        gap: 2rem;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .response-item {
        flex-direction: column;
        text-align: center;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
    }
    
    .chat-widget {
        width: calc(100vw - 60px);
        right: 30px;
        left: 30px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer-bottom-content {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .metric-number {
        font-size: 2rem;
    }
    
    .emergency-actions {
        flex-direction: column;
    }
    
    .chat-widget {
        bottom: 20px;
        right: 20px;
        left: 20px;
        width: auto;
    }
}
