/* --- Base Reset and Global Styles --- */

:root {
    --primary-color: #004d99; /* Deep Blue */
    --secondary-color: #f7a000; /* Amber/Orange */
    --text-dark: #333;
    --text-light: #fff;
    --background-light: #f9f9f9;
    --background-dark: #2c3e50; /* Dark Grey/Blue */
    --card-bg: #fff;
    --border-radius: 8px;
    --shadow-light: 0 4px 12px rgba(0, 0, 0, 0.1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Roboto', sans-serif;
}

body {
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--background-light);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

h1, h2, h3 {
    margin-bottom: 0.5em;
    font-weight: 700;
    color: var(--primary-color);
}

h2 {
    font-size: 2em;
    margin-top: 1em;
}

p {
    margin-bottom: 1em;
}

a {
    color: var(--primary-color);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* --- Header and Navigation --- */

header {
    background-color: var(--background-dark);
    color: var(--text-light);
    padding: 15px 0;
    box-shadow: var(--shadow-light);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header .logo h1 {
    color: var(--text-light);
    font-size: 1.5em;
}

header nav ul {
    list-style: none;
    display: flex;
}

header nav ul li {
    margin-left: 25px;
}

header nav ul li a {
    color: var(--text-light);
    font-weight: 700;
    transition: color 0.3s;
}

header nav ul li a:hover {
    color: var(--secondary-color);
    text-decoration: none;
}

/* --- Buttons --- */

.button {
    display: inline-block;
    padding: 10px 20px;
    border-radius: var(--border-radius);
    font-weight: 700;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s;
    border: 2px solid transparent;
}

.button.primary {
    background-color: var(--primary-color);
    color: var(--text-light);
    border-color: var(--primary-color);
}

.button.primary:hover {
    background-color: #003366; /* Darker blue */
}

.button.secondary-outline {
    background-color: transparent;
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.button.secondary-outline:hover {
    background-color: var(--primary-color);
    color: var(--text-light);
}


/* --- Image Carousel (Hero Banner) --- */

.hero-banner {
    position: relative;
    width: 100%;
    /* FIX: Set a maximum height to control visual display size */
    max-height: 900px; 
    overflow: hidden;
    color: var(--text-light);
}

.swiper {
    width: 100%;
    height: 100%; /* Fills max-height set on hero-banner */
}

.swiper-slide img {
    height: 100%;
    max-width: 2000px;
    width: auto;
    object-fit: cover; /* Ensures image fills the slide area */
    margin: 0 auto;
    display: block;
    object-position: center top;
}

.hero-content-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    background-color: rgba(0, 0, 0, 0.4); /* Dark overlay for text readability */
    z-index: 10;
}

.hero-content-overlay h2 {
    color: var(--text-light);
    font-size: 2.5em;
    margin-bottom: 10px;
}

.hero-content-overlay .tagline {
    font-size: 1.2em;
    margin-bottom: 30px;
}

/* --- Content Sections --- */

.content-section, .directory-section {
    padding: 60px 0;
}

.opportunity-section {
    padding: 60px 0;
    background-color: var(--background-dark);
    color: var(--text-light);
}

.opportunity-section h2, .opportunity-section p, .opportunity-section h4 {
    color: var(--text-light);
}

.section-subtitle {
    font-size: 1.1em;
    margin-bottom: 2em;
}

/* --- Grid and Card Layout --- */

.card {
    background-color: var(--card-bg);
    padding: 25px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
    margin-bottom: 20px;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

/* --- Map and Listing Layout --- */

.map-section-placeholder {
    display: flex;
    gap: 30px;
    align-items: stretch; /* Makes sure the children fill the height */
}

.map-view-placeholder, #businessMap, #commercialMapContainer {
    flex: 2; /* Map takes up 2/3 of the space */
    min-height: 500px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
    background-color: #eee;
}

.listing-table-placeholder {
    flex: 1; /* Listing takes up 1/3 of the space */
    padding: 25px;
    color: var(--text-dark); /* Ensure text is dark on card background */
}

.listing-table-placeholder h4 {
    margin-top: 0;
    color: var(--primary-color);
}

#commercialListingTable {
    max-height: 400px; 
    overflow-y: scroll;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 5px;
}

#commercialListingTable ul {
    list-style: none;
}

/* --- Directory Callout --- */
.directory-callout {
    background-color: #e6f0ff; 
    border: 1px solid var(--primary-color);
    padding: 20px;
    margin-top: 40px;
    border-radius: var(--border-radius);
    text-align: center;
}

/* --- Forms (Admin Panel and Upload) --- */

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 700;
}

.form-group input[type="text"],
.form-group input[type="password"],
.form-group input[type="number"],
.form-group input[type="file"],
.form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Admin Dashboard Styling */
.admin-card-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-top: 30px;
}

/* --- Flash Messages --- */

.flash-message {
    padding: 10px;
    margin-bottom: 15px;
    border-radius: 4px;
    font-weight: 700;
}

.flash-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.flash-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.flash-info {
    background-color: #cce5ff;
    color: #004085;
    border: 1px solid #b8daff;
}

/* --- Footer --- */

footer {
    background-color: #333;
    color: #ccc;
    padding: 40px 0 20px 0;
}

.footer-columns {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
}

footer h4 {
    color: var(--secondary-color);
    margin-bottom: 15px;
}

footer a {
    color: #ccc;
    transition: color 0.3s;
}

footer a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

footer ul {
    list-style: none;
}

footer ul li {
    margin-bottom: 8px;
}

.copyright {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #444;
}

/* --- Media Queries for Responsiveness --- */

@media (max-width: 900px) {
    header nav ul {
        display: none; /* Hide full nav on small screens */
    }
    
    .map-section-placeholder {
        flex-direction: column;
    }

    .map-view-placeholder, #businessMap, #commercialMapContainer, .listing-table-placeholder {
        min-height: 400px;
        flex: auto;
    }

    .admin-card-grid {
        grid-template-columns: 1fr;
    }
}