/* style.css */

/* --- Variables --- */
:root {
    --primary-color: #007bff;
    --primary-hover: #0056b3;
    --secondary-color: #6c757d;
    --light-gray: #f8f9fa;
    --dark-gray: #343a40;
    --text-color: #212529;
    --border-color: #dee2e6;
    --success-color: #28a745;
    --error-color: #dc3545;
    --container-width: 1140px;
    --border-radius: 0.25rem;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    background-color: #fff;
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

a {
    color: var(--primary-color);
    text-decoration: none;
}

a:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

img {
    max-width: 100%;
    height: auto;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1rem;
}

/* --- Header & Navigation --- */
.site-header {
    background-color: #fff;
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
}

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

.site-header .logo a {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--dark-gray);
    text-decoration: none;
}

.main-nav ul {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.main-nav a {
    color: var(--secondary-color);
    font-weight: 500;
    text-decoration: none;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--text-color);
}

.nav-button {
    background-color: var(--primary-color);
    color: #fff !important;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    text-decoration: none;
}

.nav-button:hover {
    background-color: var(--primary-hover);
    color: #fff !important;
    text-decoration: none;
}

.lang-switcher a {
    margin-left: 0.5rem;
    font-weight: bold;
    color: var(--secondary-color);
}

.lang-switcher a.active {
    color: var(--primary-color);
    text-decoration: underline;
}

/* --- Main Content --- */
.site-main {
    flex-grow: 1;
    padding: 2rem 0;
    background-color: var(--light-gray);
}

/* --- Footer --- */
.site-footer {
    background-color: var(--dark-gray);
    color: var(--light-gray);
    padding: 2rem 0;
    margin-top: auto;
}

.site-footer p {
    text-align: center;
}

/* --- Forms (Login, Register, Submit) --- */
.form-container {
    max-width: 600px;
    margin: 0 auto;
    background: #fff;
    padding: 2rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.form-container h1 {
    text-align: center;
    margin-bottom: 1.5rem;
}

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

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

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    font-size: 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
}

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

.form-group .hint {
    font-size: 0.875rem;
    color: var(--secondary-color);
    margin-top: 0.25rem;
}

.form-group input[type="file"] {
    padding: 0.5rem;
}

.form-text {
    text-align: center;
    margin-top: 1rem;
}

.btn {
    display: inline-block;
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    font-weight: 500;
    color: #fff;
    background-color: var(--primary-color);
    border: 0;
    border-radius: var(--border-radius);
    cursor: pointer;
    text-align: center;
}

.btn:hover {
    background-color: var(--primary-hover);
    text-decoration: none;
}

.alert {
    padding: 1rem;
    margin-bottom: 1rem;
    border: 1px solid transparent;
    border-radius: var(--border-radius);
}

.alert-error {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

.alert-success {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
}

/* --- Map Styles --- */
#map-main,
#submission-map {
    height: 60vh;
    width: 100%;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    margin-top: 1rem;
}

#submission-map {
    height: 400px; /* Smaller map for the form */
}

/* --- List Page --- */
.list-filters {
    background: #fff;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    margin-bottom: 2rem;
    border: 1px solid var(--border-color);
}

.list-filters form {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.list-filters .form-group {
    flex: 1 1 200px;
    margin-bottom: 0;
}

.list-filters .btn {
    width: auto;
    flex-basis: 150px;
    align-self: flex-end;
}

.feedback-list-container {
    overflow-x: auto;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
}

.feedback-list-table {
    width: 100%;
    border-collapse: collapse;
}

.feedback-list-table th,
.feedback-list-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.feedback-list-table th {
    background-color: var(--light-gray);
    font-weight: 600;
}

.feedback-list-table th a {
    color: var(--text-color);
}

.feedback-list-table tr:last-child td {
    border-bottom: 0;
}

.feedback-list-table tr:hover {
    background-color: #fdfdfd;
}

.feedback-list-table ul {
    list-style: none;
    padding-left: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .site-header .container {
        flex-direction: column;
        gap: 1rem;
    }
    .main-nav ul {
        gap: 1rem;
        flex-wrap: wrap;
        justify-content: center;
    }
    .list-filters form {
        flex-direction: column;
    }
    .list-filters .btn {
        width: 100%;
    }
}
