/* LocalPulse AI - style.css - Iteration 2 */

/* Basic Reset & Box-Sizing */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Global Body Styles - User-Centric Interface foundation */
body {
    font-family: 'Inter', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color, #333);
    background-color: var(--background-light, #f9fbfd);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center; /* Center content block horizontally */
    justify-content: flex-start; /* Start content from the top */
    padding: 20px; /* Overall padding around the main content block */
}

/* A conceptual color palette using CSS variables for future use */
:root {
    --primary-color: #0056b3; /* Darker blue for primary actions/headings */
    --primary-light: #007bff; /* Lighter blue for links/interactive elements */
    --secondary-color: #28a745; /* Green for positive sentiment/success */
    --accent-color: #ffc107; /* Yellow for warnings/highlights */
    --danger-color: #dc3545; /* Red for negative sentiment/errors */
    --text-color: #333; /* Dark text for readability */
    --text-light: #666; /* Lighter text for secondary information */
    --background-light: #f9fbfd; /* Very light background */
    --background-medium: #e9ecef; /* Slightly darker background for sections/cards */
    --border-color: #dee2e6; /* Light grey border */
    --shadow-light: rgba(0, 0, 0, 0.08); /* Light shadow for cards/sections */
}

/* Main Layout Structure */
header, main, footer {
    width: 100%;
    max-width: 1000px; /* Constrain content width for readability */
    margin-bottom: 20px; /* Spacing between main layout sections */
}

header {
    text-align: center;
    padding: 20px 0;
    background-color: #fff;
    border-bottom: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 30px;
    box-shadow: 0 2px 4px var(--shadow-light);
}

main {
    flex-grow: 1; /* Allow main content to take available vertical space */
    padding: 0 20px; /* Internal padding for main content area */
}

footer {
    text-align: center;
    padding: 20px 0;
    color: var(--text-light);
    font-size: 0.9em;
    border-top: 1px solid var(--border-color);
    margin-top: 30px;
}

/* Typography */
h1 {
    font-size: 2.8em;
    color: var(--primary-color);
    margin-bottom: 0.2em;
    line-height: 1.2;
}

.tagline { /* Specific style for header tagline */
    font-size: 1.2em;
    color: var(--text-light);
    margin-top: 0;
    margin-bottom: 1em;
    font-weight: 300;
}

h2 {
    font-size: 2em;
    color: var(--primary-color);
    margin-bottom: 1em;
    text-align: center;
    padding-top: 15px; /* Spacing from the top of the section */
}

h3 {
    font-size: 1.4em;
    color: var(--primary-color);
    margin-bottom: 0.8em;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 5px;
}

p {
    font-size: 1.1em;
    margin-bottom: 1em;
    text-align: left; /* Default paragraphs are left-aligned */
    max-width: none; /* Override previous max-width if any */
}

p + p { /* Add extra space between consecutive paragraphs */
    margin-top: 0.5em;
}

ul {
    list-style: none; /* Remove default bullet points */
    padding-left: 0;
    margin-bottom: 1em;
}

ul li {
    position: relative;
    padding-left: 25px; /* Space for custom bullet */
    margin-bottom: 0.5em;
    font-size: 1.05em;
}

ul li::before {
    content: '•'; /* Custom bullet point */
    color: var(--primary-color);
    position: absolute;
    left: 0;
    font-size: 1.2em;
    line-height: 1.6; /* Align custom bullet with text */
}

/* Basic Link Styling */
a {
    color: var(--primary-light);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Section Styling */
section {
    background-color: #fff;
    padding: 30px;
    margin-bottom: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 8px var(--shadow-light);
}

/* Specific Section Styles */
#key-features ul li strong,
#design-principles ul li strong {
    color: var(--primary-color);
}

#technical-stack {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    padding-top: 0; /* H2 already has padding from section */
}

#technical-stack h2 {
    grid-column: 1 / -1; /* Make h2 span all columns in the grid */
    margin-bottom: 1em;
}

.tech-stack-category {
    background-color: var(--background-light);
    padding: 20px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
}

.tech-stack-category h3 {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0.5em;
}

.tech-stack-category ul {
    margin-bottom: 0;
}

/* Geo Area Definition Section */
#geo-area-definition {
    text-align: center;
}

#geo-area-definition h2 {
    margin-bottom: 1.5em;
}

.input-group {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap; /* Allow elements to wrap on smaller screens */
}

.input-group label {
    font-weight: bold;
    color: var(--text-color);
    flex-shrink: 0; /* Prevent label from shrinking */
}

.input-group input[type="text"] {
    flex-grow: 1; /* Allow input to grow and take available space */
    max-width: 400px; /* Max width for input field */
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 1em;
    color: var(--text-color);
}

.input-group input[type="text"]:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25); /* Focus ring */
}

button {
    padding: 10px 20px;
    background-color: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 5px;
    font-size: 1em;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
    flex-shrink: 0; /* Prevent button from shrinking */
}

button:hover {
    background-color: var(--primary-light);
    transform: translateY(-1px); /* Subtle lift effect */
}

button:active {
    transform: translateY(0); /* Return to original position on click */
}

button:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.5); /* Focus ring for accessibility */
}

#map-placeholder {
    height: 300px;
    background-color: var(--background-medium);
    border: 1px dashed var(--border-color);
    margin-top: 15px;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column; /* Stack text content vertically */
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    font-style: italic;
    border-radius: 8px;
    text-align: center;
    padding: 20px;
    line-height: 1.4;
}

#current-area-display {
    font-weight: bold;
    color: var(--primary-color);
    margin-top: 10px;
    font-size: 1.1em;
    text-align: center;
}

/* Dashboard Section */
#dashboard-container h2 {
    margin-bottom: 1.5em;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.dashboard-card {
    background-color: #fff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 4px 12px var(--shadow-light);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* Distribute space evenly */
}

.dashboard-card h3 {
    color: var(--primary-color);
    font-size: 1.25em;
    margin-bottom: 1em;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}

.dashboard-card p {
    margin-bottom: 0.8em;
    font-size: 1em;
}

.dashboard-card p span {
    font-weight: bold;
    color: var(--primary-color); /* Default span color */
}

/* Sentiment specific colors (assuming data-sentiment attribute is set by JS) */
#overall-sentiment[data-sentiment="Positive"],
#overall-sentiment[data-sentiment="Neutral-Positive"] {
    color: var(--secondary-color);
}
#overall-sentiment[data-sentiment="Neutral"] {
    color: var(--accent-color);
}
#overall-sentiment[data-sentiment="Negative"] {
    color: var(--danger-color);
}

.dashboard-card ul {
    margin-top: 0.5em;
}

.dashboard-card ul li {
    font-size: 0.95em;
    margin-bottom: 0.3em;
    padding-left: 20px;
}

.dashboard-card ul li::before {
    font-size: 1em;
    line-height: 1.5;
}

.dashboard-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
    flex-wrap: wrap;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    body {
        padding: 20px 10px;
    }

    h1 {
        font-size: 2.2em;
    }

    .tagline {
        font-size: 1.1em;
    }

    h2 {
        font-size: 1.8em;
    }

    h3 {
        font-size: 1.3em;
    }

    p {
        font-size: 1em;
    }

    section {
        padding: 20px;
    }

    .input-group {
        flex-direction: column;
        align-items: stretch;
    }

    .input-group input[type="text"] {
        max-width: 100%;
    }

    .dashboard-grid {
        grid-template-columns: 1fr; /* Stack dashboard cards on smaller screens */
    }

    .dashboard-actions {
        flex-direction: column;
        align-items: stretch;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.8em;
    }

    .tagline {
        font-size: 1em;
    }

    h2 {
        font-size: 1.5em;
    }

    button {
        width: 100%; /* Full width buttons on very small screens */
    }
}