/* ============================================================
   KENYAYOTE SERVICES - Retro Directory Style
   Color Palette: #8B0000 (Dark Red), #FFCC00 (Gold), #111, #F4F4F4
   ============================================================ */

/* ---------- Reset & Base ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: 'Segoe UI', Arial, sans-serif;
    background: #F4F4F4;
    color: #111;
    line-height: 1.6;
}
a { color: #8B0000; text-decoration: none; }
a:hover { text-decoration: underline; }
.container { max-width: 1280px; margin: 0 auto; padding: 0 15px; }

/* ---------- Header & Navigation ---------- */
/* Top Bar */
.top-bar {
    background: #fff;
    padding: 10px 0;
    border-bottom: 2px solid #8B0000;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
}
.top-bar .brand {
    font-size: 1.5rem;
    font-weight: bold;
    color: #8B0000;
}
.top-bar .brand span { color: #111; }
.top-bar .search-form {
    display: flex;
    gap: 4px;
    flex: 1;
    max-width: 400px;
    margin: 0 15px;
}
.top-bar .search-form input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 4px 0 0 4px;
    font-size: 0.95rem;
}
.top-bar .search-form button {
    padding: 8px 16px;
    background: #8B0000;
    color: #fff;
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    font-weight: bold;
}
.top-bar .search-form button:hover { background: #a00000; }

/* Sub-nav Bar */
.sub-nav {
    background: #8B0000;
    padding: 6px 0;
}
.sub-nav ul {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 20px;
    list-style: none;
    padding: 0 15px;
    margin: 0;
}
.sub-nav ul li a {
    color: #fff;
    font-size: 0.9rem;
    padding: 4px 8px;
    border-radius: 3px;
}
.sub-nav ul li a:hover {
    background: rgba(255,255,255,0.15);
    text-decoration: none;
}
.sub-nav ul li a.active { background: #FFCC00; color: #111; }

/* ---------- Mobile Menu Toggle ---------- */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: #8B0000;
    font-size: 1.8rem;
    cursor: pointer;
    padding: 0 10px;
}
@media (max-width: 768px) {
    .menu-toggle { display: block; }
    .top-bar .search-form {
        order: 3;
        flex: 1 1 100%;
        margin: 8px 0 0;
        max-width: 100%;
    }
    .sub-nav ul { flex-wrap: wrap; gap: 2px 10px; }
    .sub-nav ul li a { font-size: 0.8rem; padding: 4px 6px; }
}

/* ---------- Homepage 3-Column Grid ---------- */
.home-grid {
    display: grid;
    grid-template-columns: 20% 55% 25%;
    gap: 20px;
    margin: 20px 0;
}
@media (max-width: 992px) {
    .home-grid { grid-template-columns: 25% 50% 25%; }
}
@media (max-width: 768px) {
    .home-grid { grid-template-columns: 1fr; gap: 15px; }
}

/* ---------- Sidebar Boxes ---------- */
.sidebar-box {
    background: #fff;
    border-radius: 4px;
    padding: 15px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.sidebar-box h3 {
    background: #8B0000;
    color: #fff;
    padding: 8px 12px;
    margin: -15px -15px 12px -15px;
    border-radius: 4px 4px 0 0;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.sidebar-box ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.sidebar-box ul li {
    padding: 4px 0;
    border-bottom: 1px solid #f0f0f0;
}
.sidebar-box ul li:last-child { border-bottom: none; }
.sidebar-box ul li a {
    color: #111;
    display: flex;
    justify-content: space-between;
}
.sidebar-box ul li a:hover { color: #8B0000; text-decoration: none; }
.sidebar-box ul li .count {
    color: #888;
    font-size: 0.85rem;
}

/* ---------- Main Content ---------- */
.main-content h2 {
    background: #8B0000;
    color: #fff;
    padding: 8px 14px;
    border-radius: 4px 4px 0 0;
    font-size: 1.1rem;
    margin: 0;
}
.main-content .content-body {
    background: #fff;
    padding: 15px;
    border-radius: 0 0 4px 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

/* Featured Banner */
.featured-banner {
    background: #FFCC00;
    padding: 15px 20px;
    border-radius: 4px;
    margin-bottom: 15px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
}
.featured-banner .badge {
    background: #8B0000;
    color: #fff;
    padding: 2px 12px;
    border-radius: 20px;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.featured-banner .name { font-weight: bold; font-size: 1.1rem; }
.featured-banner .desc { color: #333; font-size: 0.9rem; }

/* Tabs */
.tabs-nav {
    display: flex;
    gap: 0;
    border-bottom: 2px solid #8B0000;
    margin-bottom: 15px;
}
.tabs-nav button {
    padding: 8px 18px;
    background: none;
    border: none;
    cursor: pointer;
    font-weight: 500;
    color: #555;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
}
.tabs-nav button.active {
    color: #8B0000;
    border-bottom-color: #8B0000;
}
.tabs-nav button:hover { background: #f5f5f5; }

/* Provider Table */
.provider-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}
.provider-table th {
    background: #8B0000;
    color: #fff;
    padding: 8px 10px;
    text-align: left;
}
.provider-table td {
    padding: 8px 10px;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
}
.provider-table tr:hover { background: #fafafa; }
.provider-table .stars {
    color: #FFCC00;
    letter-spacing: 1px;
}
.provider-table .rating-count {
    color: #888;
    font-size: 0.75rem;
}
@media (max-width: 600px) {
    .provider-table { font-size: 0.8rem; }
    .provider-table th, .provider-table td { padding: 6px 8px; }
}

/* ---------- Quick Actions ---------- */
.quick-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.quick-actions .btn {
    display: block;
    text-align: center;
    padding: 10px;
    background: #8B0000;
    color: #fff;
    border-radius: 4px;
    font-weight: bold;
}
.quick-actions .btn:hover {
    background: #a00000;
    text-decoration: none;
}
.quick-actions .btn-secondary {
    background: #f0f0f0;
    color: #111;
}
.quick-actions .btn-secondary:hover { background: #ddd; }

/* ---------- AJAX Search Results ---------- */
#search-results {
    margin-top: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    max-height: 400px;
    overflow-y: auto;
}
#search-results .result-item {
    padding: 8px 12px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
}
#search-results .result-item:last-child { border-bottom: none; }
#search-results .result-item .name { font-weight: bold; }
#search-results .result-item .desc {
    color: #666;
    font-size: 0.85rem;
    max-width: 60%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ---------- PROFILE PAGE ---------- */
.profile-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 15px 0;
}
.profile-grid .label {
    font-weight: bold;
    color: #8B0000;
}
@media (max-width: 768px) {
    .profile-grid { grid-template-columns: 1fr; }
}

.profile-images {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.profile-images img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    border: 1px solid #ddd;
}
.profile-images img:hover { border-color: #8B0000; }

/* Feedback Section */
.feedback-section {
    margin-top: 30px;
    border-top: 2px solid #8B0000;
    padding-top: 20px;
}
.feedback-section h3 {
    background: #8B0000;
    color: #fff;
    padding: 8px 14px;
    border-radius: 4px 4px 0 0;
    display: inline-block;
    font-size: 1rem;
}
.feedback-form {
    background: #fff;
    padding: 20px;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    margin: 10px 0 20px;
}
.feedback-form .form-group {
    margin-bottom: 12px;
}
.feedback-form label {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 3px;
}
.feedback-form select,
.feedback-form textarea {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.95rem;
}
.feedback-form textarea { min-height: 80px; resize: vertical; }
.feedback-form .btn-submit {
    background: #8B0000;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
}
.feedback-form .btn-submit:hover { background: #a00000; }

.feedback-list .review-card {
    background: #fff;
    padding: 12px 16px;
    border-radius: 4px;
    margin-bottom: 10px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.06);
}
.review-card .meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
}
.review-card .meta .username { font-weight: bold; }
.review-card .meta .stars { color: #FFCC00; }
.review-card .meta .date { color: #888; }
.review-card .body { margin-top: 4px; }

/* ---------- Flash Messages ---------- */
.flash-message, .flash-error {
    padding: 10px 16px;
    border-radius: 4px;
    margin: 10px 0;
}
.flash-message {
    background: #e6f7e6;
    color: #2e7d32;
    border-left: 4px solid #2e7d32;
}
.flash-error {
    background: #fde8e8;
    color: #b71c1c;
    border-left: 4px solid #b71c1c;
}

/* ---------- Pagination ---------- */
.pagination {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    margin-top: 15px;
}
.pagination a {
    padding: 4px 10px;
    background: #f0f0f0;
    color: #111;
    border-radius: 3px;
    font-size: 0.85rem;
}
.pagination a.active {
    background: #8B0000;
    color: #fff;
}
.pagination a:hover { text-decoration: none; background: #ddd; }

/* ---------- Responsive Tweaks ---------- */
@media (max-width: 480px) {
    .top-bar .brand { font-size: 1.2rem; }
    .sub-nav ul { gap: 0 6px; }
    .featured-banner { flex-direction: column; align-items: flex-start; gap: 4px; }
}