/* Main directory container */
.business-directory {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    color: #333;
}

/* Directory header */
.directory-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f2f5;
}

.directory-header h2 {
    font-size: 28px;
    color: #2c3e50;
    margin: 0;
    font-weight: 700;
}

.directory-filters {
    background: #f8f9fa;
    padding: 10px 15px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.directory-filters label {
    font-weight: 600;
    margin-right: 10px;
    color: #4a5568;
}

.directory-filters select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    font-size: 15px;
    min-width: 200px;
    color: #4a5568;
}

/* Business listings */
.business-listings {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
}

.business-listing {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    border: 1px solid #e2e8f0;
}

.business-listing:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
}

.listing-content-wrapper {
    display: flex;
    padding: 0;
}

/* Featured image styles */
.featured-image-top img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
}

.featured-image-side {
    flex: 0 0 35%;
    padding: 0;
    overflow: hidden;
}

.featured-image-side img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Image position styles */
.image-position-left .featured-image-side {
    order: -1;
}

.image-position-right .featured-image-side {
    order: 1;
}

.image-position-top .featured-image-top {
    margin-bottom: 20px;
}

.listing-content {
    flex: 1;
    padding: 25px;
}

.listing-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #edf2f7;
}

.listing-header h3 {
    margin: 0 0 10px;
    font-size: 24px;
    color: #2d3748;
    font-weight: 700;
}

.business-tagline {
    font-size: 16px;
    color: #4a5568;
    font-style: italic;
}

.business-description {
    margin-bottom: 25px;
    line-height: 1.7;
    color: #4a5568;
    font-size: 15px;
}

.business-meta-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    margin-bottom: 25px;
}

.business-meta {
    font-size: 14px;
    color: #4a5568;
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
}

.rating {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.stars {
    color: #f1c40f;
    font-size: 18px;
    margin-right: 8px;
}

.reviews {
    font-size: 14px;
}

.years {
    margin-bottom: 15px;
    font-weight: 500;
}

.location h4 {
    margin: 0 0 10px;
    font-size: 16px;
    color: #2c3e50;
    font-weight: 600;
}

.address {
    margin-bottom: 8px;
    line-height: 1.5;
}

.phone, .employees {
    margin-bottom: 5px;
}

.business-services {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    border-left: 3px solid #3498db;
}

.business-services h4 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #2c3e50;
    font-size: 18px;
    font-weight: 600;
    padding-bottom: 8px;
    border-bottom: 1px solid #e2e8f0;
}

.business-services ul {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.business-services li {
    padding: 8px 0;
    border-bottom: 1px dashed #e2e8f0;
    font-size: 15px;
    position: relative;
    padding-left: 20px;
}

.business-services li:before {
    content: "•";
    position: absolute;
    left: 0;
    color: #3498db;
    font-size: 20px;
    line-height: 1;
}

.business-services li:last-child {
    border-bottom: none;
}

.business-website {
    display: block;
    text-align: center;
    padding: 12px;
    background: #3498db;
    color: white !important;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.3s;
    border-radius: 4px;
    margin: 20px 0;
    font-size: 16px;
}

.business-website:hover {
    background: #2980b9;
}

.business-cta {
    padding: 25px;
    background: linear-gradient(135deg, #1a202c 0%, #2d3748 100%);
    text-align: center;
    border-radius: 8px;
    color: white;
    margin-top: 20px;
}

.cta-headings {
    margin-bottom: 15px;
}

.business-cta h4 {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 1px;
}

.business-cta h5 {
    margin: 5px 0 0;
    font-size: 32px;
    font-weight: 800;
    color: #3498db;
    text-transform: uppercase;
}

.business-cta p {
    margin: 0;
    font-style: italic;
    color: #cbd5e0;
    font-size: 16px;
    line-height: 1.6;
    max-width: 600px;
    margin: 0 auto;
}

/* Loading state */
.loading {
    text-align: center;
    padding: 30px;
    grid-column: 1 / -1;
    font-style: italic;
    color: #777;
}

.no-businesses, .error {
    text-align: center;
    padding: 30px;
    grid-column: 1 / -1;
    font-style: italic;
    color: #e74c3c;
}

/* Responsive adjustments */
@media (max-width: 900px) {
    .business-meta-grid {
        grid-template-columns: 1fr;
    }
    
    .featured-image-side {
        flex: 0 0 300px;
    }
}

@media (max-width: 768px) {
    .listing-content-wrapper {
        flex-direction: column;
    }
    
    .image-position-left .featured-image-side,
    .image-position-right .featured-image-side {
        order: -1;
        flex: 0 0 auto;
        height: 250px;
    }
    
    .directory-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .directory-filters {
        margin-top: 15px;
        width: 100%;
    }
}

@media (max-width: 480px) {
    .business-cta h4 {
        font-size: 20px;
    }
    
    .business-cta h5 {
        font-size: 26px;
    }
    
    .listing-header h3 {
        font-size: 22px;
    }
}