/*
Theme Name: FirmsWorld Theme
Description: A custom, lightning-fast skeleton theme built specifically for FirmsWorld corporate profiles.
Author: FirmsWorld
Version: 1.0
*/

/* --- BASE STYLES --- */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.7;
    color: #333;
    margin: 0;
    padding: 0;
    background-color: #f4f7f9;
}

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

/* --- LAYOUT --- */
.site-header {
    background: #002147;
    color: #fff;
    padding: 20px 0;
    text-align: center;
}

.site-header a {
    color: #fff;
    text-decoration: none;
    font-size: 24px;
    font-weight: bold;
}

.container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

.content-sidebar-wrap {
    display: grid;
    grid-template-columns: 2.5fr 1fr;
    gap: 40px;
}

/* --- MAIN CONTENT --- */
.main-content {
    background: #fff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.main-content h1 {
    font-size: 2.2em;
    margin-top: 0;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
}

/* --- SIDEBAR --- */
.sidebar {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    height: fit-content;
}

.sidebar h3 {
    margin-top: 0;
    font-size: 1.2em;
    border-bottom: 2px solid #002147;
    padding-bottom: 10px;
    color: #002147;
}

.related-company-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.related-company-list li {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.related-company-list li:last-child {
    border-bottom: none;
}

.related-company-list a {
    text-decoration: none;
    color: #0056b3;
    font-weight: 600;
}

.related-company-list a:hover {
    text-decoration: underline;
}

/* --- MOBILE RESPONSIVENESS --- */
@media (max-width: 900px) {
    .content-sidebar-wrap {
        grid-template-columns: 1fr;
    }
}
/* --- LOGO SIZING --- */
.header-logo {
    max-width: 280px; /* Scales the 499px image down cleanly for desktop */
    height: auto;
    display: inline-block;
    vertical-align: middle;
}

/* Mobile adjustments */
@media (max-width: 600px) {
    .header-logo {
        max-width: 220px; /* Slightly smaller on phones to prevent stretching */
    }
}
/* --- CATEGORY MENU GRID --- */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 50px;
}

.category-card {
    background: #fff;
    border: 1px solid #e1e8ed;
    border-radius: 8px;
    padding: 25px 20px;
    text-align: center;
    text-decoration: none;
    color: #002147;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.category-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.08);
    border-color: #0056b3;
    color: #0056b3;
}

.category-icon {
    width: 45px;
    height: 45px;
    margin-bottom: 15px;
    fill: #0056b3; /* Matches your theme's blue */
    transition: fill 0.3s ease;
}

.category-card:hover .category-icon {
    fill: #002147; /* Darkens on hover */
}

.category-count {
    font-size: 0.8em;
    color: #666;
    margin-top: 5px;
    font-weight: normal;
}
/* --- FOOTER --- */
.site-footer {
    background: #002147;
    color: #fff;
    padding: 30px 0;
    margin-top: 60px;
    font-size: 0.9em;
}

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

.footer-links {
    display: flex;
    gap: 35px; /* Creates wide, perfectly even space between the links */
    justify-content: flex-end; /* Forces the links to the far right */
    align-items: center;
}

.footer-links a {
    color: #fff;
    text-decoration: none;
    opacity: 0.9;
    transition: opacity 0.3s ease;
    white-space: nowrap; /* Prevents the link text from breaking into two lines */
}

.footer-links a:hover {
    opacity: 1;
    text-decoration: underline;
}

/* Mobile Adjustments for Footer */
@media (max-width: 768px) {
    .footer-container {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-copyright {
        margin-bottom: 15px;
    }
    
    .footer-links a {
        display: inline-block;
        margin: 5px 12px;
    }
}
