/* File: public_html/assets/css/style.css */

/* General Styles */
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; line-height: 1.6; margin: 0; background: #f9f9f9; color: #333; display: flex; flex-direction: column; min-height: 100vh; }
.container { max-width: 1200px; margin: auto; padding: 2rem; flex: 1; }
a { color: #0066cc; text-decoration: none; }
h1, h2, h3 { color: #2c3e50; }
section { margin-bottom: 3rem; }

/* Header */
header { background: #fff; color: #333; padding: 1rem 2rem; border-bottom: 2px solid #e0e0e0; display: flex; justify-content: space-between; align-items: center; }
header .logo { height: 50px; }
header nav a { margin: 0 15px; font-weight: bold; font-size: 16px; transition: color 0.2s; }
header nav a:hover { color: #0056b3; }

/* Main Content Layout */
.main-content { display: flex; flex-wrap: wrap; gap: 2rem; }
.content-feed { flex: 3; min-width: 300px; }
.sidebar { flex: 1; min-width: 250px; }
.sidebar img { max-width: 100%; border: 1px solid #ddd; border-radius: 5px; }

/* Cards */
.card-container { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.5rem; }
.card { background: #fff; border: 1px solid #ddd; padding: 1.5rem; border-radius: 8px; box-shadow: 0 2px 5px rgba(0,0,0,0.05); }
.card h3 { margin-top: 0; }
.card a { font-weight: bold; }

/* Business Cards in Directory */
.business-card { display: flex; flex-direction: column; align-items: flex-start; }
.business-card .business-logo { max-width: 100px; max-height: 100px; object-fit: contain; margin-bottom: 1rem; border: none; } /* Specific style for business logos */
.business-card .btn {
    display: inline-block;
    background: #007bff;
    color: #fff;
    padding: 8px 15px;
    border-radius: 5px;
    text-decoration: none;
    margin-top: 1rem;
}
.business-card .btn:hover { background: #0056b3; }


/* Forms */
.form-container, .form-container-portal { max-width: 600px; margin: 2rem auto; padding: 2rem; background: #fff; border: 1px solid #ddd; border-radius: 8px; }
.form-container-portal { margin: 0 0 2rem 0; padding: 1.5rem; }
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; margin-bottom: .5rem; font-weight: bold; }
.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="datetime-local"],
.form-group input[type="url"],
.form-group textarea,
.form-group select { /* Added select to styling */
    width: 100%;
    padding: 10px;
    box-sizing: border-box;
    border: 1px solid #ccc;
    border-radius: 4px;
}
span.error { color: #dc3545; font-size: 0.9em; }

/* Buttons */
input[type="submit"], button { background: #007bff; color: #fff; padding: 12px 20px; border: none; cursor: pointer; border-radius: 5px; font-size: 16px; }
button.btn-reject { background: #dc3545; }
input[type="submit"]:hover, button:hover { opacity: 0.9; }

/* Admin & Portal Specifics */
.portal-columns { display: flex; flex-wrap: wrap; gap: 2rem; }
.portal-column { flex: 1; min-width: 300px; }
.portal-column ul { list-style-type: none; padding: 0; }
.portal-column li { background: #fff; padding: 10px; border: 1px solid #eee; margin-bottom: 5px; border-radius: 4px; }
table { width: 100%; border-collapse: collapse; margin-top: 1rem; background: #fff; }
th, td { padding: 12px; border: 1px solid #ddd; text-align: left; }
th { background-color: #f2f2f2; }
td form { margin: 0; }

/* Directory Page Layout */
.directory-layout {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap; /* Allows wrapping on smaller screens */
}

.category-sidebar {
    flex: 1; /* Takes up 1 part of the available space */
    min-width: 200px; /* Minimum width for the sidebar */
    background: #fff;
    padding: 1.5rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    height: fit-content; /* Adjusts height to content */
    position: sticky; /* Makes it stick when scrolling */
    top: 20px; /* Distance from top when sticky */
}

.category-sidebar h3 {
    margin-top: 0;
    color: #2c3e50;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.category-sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-sidebar ul li {
    margin-bottom: 5px;
}

.category-sidebar ul li a {
    display: block;
    padding: 8px 10px;
    color: #333;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.2s, color 0.2s;
}

.category-sidebar ul li a:hover {
    background-color: #e0f7fa; /* Light blue background on hover */
    color: #0056b3;
}

.category-sidebar ul li a.active {
    background-color: #007bff; /* Active category background */
    color: white;
    font-weight: bold;
}

.business-listings-area {
    flex: 3; /* Takes up 3 parts of the available space */
    min-width: 600px; /* Minimum width for business listings */
}

/* Pagination Styles */
.pagination {
    margin-top: 2rem;
    text-align: center;
    display: flex;
    justify-content: center;
    gap: 10px;
}
.pagination .page-link {
    display: inline-block;
    padding: 8px 16px;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #007bff;
    text-decoration: none;
    transition: background-color 0.3s, color 0.3s;
}
.pagination .page-link:hover:not(.active) {
    background-color: #f2f2f2;
}
.pagination .page-link.active {
    background-color: #007bff;
    color: white;
    border-color: #007bff;
    cursor: default;
}


/* Footer */
footer { text-align: center; padding: 2rem; margin-top: auto; background: #2c3e50; color: #fff; }

/* Responsive adjustments */
@media (max-width: 768px) {
    .directory-layout {
        flex-direction: column; /* Stack sidebar and listings on small screens */
    }
    .category-sidebar, .business-listings-area {
        min-width: unset; /* Remove min-width to allow full width */
        width: 100%;
        position: static; /* Disable sticky on small screens */
    }
}