/* Reusing ALL the same CSS from homepage */
:root {
    --deep-blue: #004488;
    --soft-aqua: #00B3B3;
    --light-gray: #F4F4F4;
    --terracotta: #D96941;
    --olive-green: #6C8E47;
    --dark: #2c3e50;
    --gray: #6c757d;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: #fff;
    color: var(--dark);
    line-height: 1.6;
    font-family: 'Inter', 'Open Sans', sans-serif;
}

h1, h2, h3, h4, h5, h6,
.button, .cta-button, .nav-item > a {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
}

.accent-text {
    font-family: 'Montserrat', sans-serif;
}

/* Directory Header */
.directory-header {
    padding: 40px 10px 20px;
    background-color: white;
}

.directory-header h1 {
    margin-bottom: 15px;
    color: var(--deep-blue);
}

.directory-intro {
    /* max-width: 800px; */
    margin-bottom: 30px;
}

/* Filter Bar */
.filter-bar {
    background-color: var(--light);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 15px;
}

.filter-row:last-child {
    margin-bottom: 0;
}

.filter-group {
    flex: 1;
    min-width: 200px;
}

.filter-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--dark);
}

.filter-select, .filter-input {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: 'Inter', sans-serif;
}

.filter-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
}

.filter-reset {
    color: var(--deep-blue);
    text-decoration: none;
    font-size: 0.9rem;
}

/* Directory Grid */
.directory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    margin: 40px 0;
}

.company-card {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.company-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.company-banner {
    height: 150px;
    position: relative;
    background-color: var(--light-gray);
}

.company-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.company-logo-container {
    position: absolute;
    bottom: -30px;
    left: 20px;
    width: 80px;
    height: 80px;
    background-color: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    border: 2px solid white;
}

.company-logo {
    max-width: 90%;
    max-height: 90%;
}

.company-content {
    padding: 40px 20px 20px;
}

.company-name {
    margin-bottom: 5px;
}

.company-category {
    color: var(--soft-aqua);
    font-size: 0.9rem;
    margin-bottom: 15px;
    display: block;
}

.company-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    font-size: 0.9rem;
    color: var(--gray);
}

.company-meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.company-description {
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.company-actions {
    display: flex;
    gap: 10px;
}

.action-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 15px;
    background-color: var(--light-gray);
    color: var(--dark);
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.action-button.primary {
    background-color: var(--deep-blue);
    color: white;
}

/* Featured Companies Section */
.featured-section {
    background-color: var(--light-gray);
    padding: 40px 0;
    margin: 40px 0;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.section-header h2 {
    color: var(--deep-blue);
}

.section-header a {
    color: var(--deep-blue);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

/* Categories Section */
.categories-section {
    padding: 40px 10px;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.category-card {
    background-color: var(--light-gray);
    border-radius: 8px;
    padding: 25px 15px;
    text-align: center;
    transition: all 0.3s;
    cursor: pointer;
}

.category-card:hover {
    background-color: var(--deep-blue);
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.category-card:hover .category-icon, 
.category-card:hover .category-title,
.category-card:hover .category-count {
    color: white;
}

.category-icon {
    font-size: 2.5rem;
    color: var(--deep-blue);
    margin-bottom: 15px;
    transition: color 0.3s;
}

.category-title {
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--dark);
    transition: color 0.3s;
}

.category-count {
    color: var(--gray);
    font-size: 0.9rem;
    transition: color 0.3s;
}

.toggle-categories-btn {
    display: block;
    margin: 30px auto 0;
    padding: 12px 24px;
    background-color: var(--light-gray);
    color: var(--dark);
    border: none;
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
}

.toggle-categories-btn:hover {
    background-color: var(--deep-blue);
    color: white;
}

.toggle-categories-btn i {
    margin-right: 8px;
    transition: transform 0.3s;
}

.toggle-categories-btn.collapsed i {
    transform: rotate(0deg);
}

.toggle-categories-btn.expanded i {
    transform: rotate(180deg);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 40px 0;
}

.page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: var(--light-gray);
    color: var(--dark);
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s;
}

.page-link:hover, .page-link.active {
    background-color: var(--deep-blue);
    color: white;
}

/* CTA Section */
.cta-section {
    background-color: var(--deep-blue);
    color: white;
    padding: 60px 0;
    text-align: center;
}

.cta-section h2 {
    margin-bottom: 20px;
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
}

/* No Results Card Styles */
.no-results-card {
    background-color: white;
    border-radius: 8px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    max-width: 600px;
    margin: 40px auto;
}

.no-results-icon {
    font-size: 4rem;
    color: var(--soft-aqua);
    margin-bottom: 20px;
}

.no-results-title {
    color: var(--deep-blue);
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.no-results-message {
    color: var(--gray);
    margin-bottom: 25px;
    font-size: 1.1rem;
}

.no-results-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Adjust directory grid when empty */
.directory-grid:empty {
    display: none;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .directory-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
    
    .company-banner {
        height: 120px;
    }
    
    .company-logo-container {
        width: 60px;
        height: 60px;
        bottom: -20px;
    }
    
    .filter-row {
        flex-direction: column;
        gap: 15px;
    }
    
    .filter-group {
        min-width: 100%;
    }
}

@media (max-width: 480px) {
    .company-actions {
        flex-direction: column;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
}

/* Featured badge */
.featured-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: var(--terracotta);
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    z-index: 1;
}

/* Premium badge */
.premium-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: var(--olive-green);
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    z-index: 1;
}