/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Assistant', sans-serif;
    background-color: #f4f4f4; /* Light background for better readability */
    color: #333333; /* Dark text */
    direction: rtl; /* Right-to-left layout for Hebrew */
}

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

/* Header Styles */
.main-header {
    background-color: #ff3b3f; /* Vivid red for urgency */
    color: #ffffff;
    padding: 20px 0;
    position: relative;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.main-header h1 {
    font-size: 2.5em;
    text-align: center;
    margin: 0;
    font-weight: 600;
}

.nav-links {
    list-style: none;
    display: flex;
}

.nav-links li {
    margin-left: 20px;
}

.nav-links a {
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: #ffffffcc; /* Slight transparency on hover */
}

/* Controls */
.controls {
    position: fixed;
    bottom: 20px;
    left: 20px;
    display: flex;
    gap: 10px;
    z-index: 1002;
}

.controls .btn-control {
    background-color: #e74c3c; /* Red color for controls */
    color: #ffffff;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: bold;
    font-size: 1em;
    transition: background-color 0.3s ease;
}

.controls .btn-control:hover {
    background-color: #c0392b; /* Darker red on hover */
}

.controls .btn-control:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.5); /* Focus ring */
}

/* Button Styles */
.btn {
    padding: 10px 20px;
    background-color: #3498db; /* Blue color for general buttons */
    color: #ffffff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s ease;
    font-weight: 600;
}

.btn:hover {
    background-color: #2980b9; /* Darker blue on hover */
}

.btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.5); /* Focus ring */
}

.btn-search {
    background-color: #27ae60; /* Green color for search buttons */
}

.btn-search:hover {
    background-color: #1e8449; /* Darker green on hover */
}

.btn-close {
    background-color: #e74c3c; /* Red color for close buttons */
    color: #ffffff;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1.2em;
    transition: background-color 0.3s ease;
}

.btn-close:hover {
    background-color: #c0392b; /* Darker red on hover */
}

.btn-close:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.5); /* Focus ring */
}

/* Split Screen Container */
.split-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    padding: 40px 0;
}

.search-section,
.map-section {
    flex: 1 1 45%; /* Take up approximately half the width */
    background-color: #ffffff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.search-section h2,
.map-section h2 {
    margin-bottom: 20px;
    font-size: 1.5rem;
    color: #ff3b3f;
    border-bottom: 2px solid #ff3b3f;
    padding-bottom: 10px;
}

.search-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    margin-bottom: 5px;
    font-weight: 600;
}

.form-group input {
    padding: 10px;
    border: 1px solid #bdc3c7;
    border-radius: 4px;
    font-size: 1rem;
}

.map-container {
    height: 400px;
    width: 100%;
    border: 2px solid #bdc3c7;
    border-radius: 4px;
    overflow: hidden;
}

/* Search Results */
.results-section {
    margin-top: 30px;
}

.results-section h2 {
    margin-bottom: 20px;
    font-size: 1.5rem;
    color: #ff3b3f;
    border-bottom: 2px solid #ff3b3f;
    padding-bottom: 10px;
}

.results-list {
    list-style: none;
}

.results-list li {
    background-color: #ffffff;
    padding: 15px 20px;
    margin-bottom: 10px;
    border-left: 5px solid #3498db;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.results-list li:hover {
    background-color: #ecf0f1;
}

/* Popup Styles */
.popup {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #ffffff;
    width: 90%;
    max-width: 500px;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
    z-index: 1001;
    text-align: center;
}

.popup-content {
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.close-button {
    background-color: transparent;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    position: absolute;
    top: 10px;
    left: 10px;
    color: #e74c3c;
}

.close-button:hover {
    color: #c0392b;
}

.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

/* Alert Sound */
audio {
    display: none;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .split-container {
        flex-direction: column;
    }

    .search-section,
    .map-section {
        flex: 1 1 100%;
    }
}

@media (max-width: 768px) {
    .main-header h1 {
        font-size: 2em;
    }

    .controls .btn-control {
        font-size: 1rem;
        padding: 8px 16px;
    }

    .controls .btn-control {
        width: 40px;
        height: 40px;
    }

    .search-form {
        flex-direction: column;
    }

    .search-section h2,
    .results-section h2,
    .map-section h2 {
        font-size: 1.3rem;
    }

    .btn {
        font-size: 0.9rem;
    }

    .controls .btn-control {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .alert-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .alert-threats img {
        width: 35px;
        height: 35px;
        margin-left: 0;
        margin-top: 10px;
    }

    .popup {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .main-header h1 {
        font-size: 1.5rem;
    }

    .search-section h2,
    .results-section h2,
    .map-section h2 {
        font-size: 1.3rem;
    }

    .btn {
        font-size: 0.9rem;
    }
}

/* Accessibility Enhancements */
button:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 59, 63, 0.5);
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f5f5f5; 
}

::-webkit-scrollbar-thumb {
    background: #ff3b3f; 
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #e23337; 
}

/* Live Alerts Banner Styles */
.live-alerts-banner {
    background-color: #ffecec; /* Light red background to indicate urgency */
    padding: 30px 0;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.banner-header {
    color: #ff3b3f;
    text-align: center;
    font-size: 2em;
    margin-bottom: 20px;
    font-weight: 600;
}

.banner-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

#live-alerts-container {
    font-size: 1.2em;
    text-align: center;
    color: #333;
    margin-bottom: 10px;
}

#live-alerts-list {
    list-style: none;
    padding: 0;
    margin-bottom: 20px;
    max-width: 600px;
    width: 100%;
}

#live-alerts-list h3 {
    font-size: 1.5em;
    color: #ff3b3f;
    margin-bottom: 10px;
    text-align: center;
}

#live-alerts-list li {
    background-color: #ffffff;
    padding: 15px;
    margin-bottom: 10px;
    border-left: 5px solid #ff3b3f;
    border-radius: 4px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s ease;
}

#live-alerts-list li:hover {
    background-color: #ffecec;
}

/* Mute and Speech Buttons */
.mute-button,
.speech-button {
    background-color: #e74c3c; /* Red color for alert buttons */
    color: #ffffff;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: bold;
    font-size: 1em;
    transition: background-color 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    position: fixed;
    left: 20px;
    bottom: 20px;
    z-index: 1002; /* Ensure buttons are above other elements */
}

.mute-button:hover,
.speech-button:hover {
    background-color: #c0392b; /* Darker red on hover */
}

.mute-button:focus,
.speech-button:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.5); /* Focus ring */
}

.mute-button {
    bottom: 70px; /* Adjust positioning to prevent overlap */
}

.speech-button {
    bottom: 20px;
}