/* Business Network Custom Styles */

/* Business Network Page Styles */
.business-network-page {
    padding: 60px 0 80px;
    background: #f8f9fa;
    min-height: 80vh;
}

.page-header {
    background: linear-gradient(135deg, #1E58A7 0%, #223E7E 100%);
    color: white;
    padding: 40px 0;
    margin-bottom: 40px;
}

.page-header h1 {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 10px;
}

.page-header p {
    font-size: 18px;
    opacity: 0.9;
}

/* Search and Filter Section */
.search-filter-section {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    margin-bottom: 40px;
}

.search-filter-row {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    align-items: flex-end;
}

.search-box-wrapper {
    flex: 1;
    min-width: 300px;
}

.search-box-wrapper label,
.area-filter-wrapper label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #2d3748;
    font-size: 14px;
}

.search-input,
.area-select,
.autocomplete-input {
    width: 100%;
    padding: 10px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.2s ease;
    background: #ffffff;
    color: #212121;
}

.search-input:focus,
.area-select:focus,
.autocomplete-input:focus {
    outline: none;
    border-color: #1E58A7;
    box-shadow: 0 0 0 2px rgba(30, 88, 167, 0.1);
}

/* Autocomplete Results */
.autocomplete-results {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    max-height: 400px;
    overflow-y: auto;
    z-index: 10000;
    display: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    min-width: 100%;
    width: max-content;
    max-width: 800px;
    margin-top: 0;
    padding: 4px 0;
}

.area-filter-wrapper {
    position: relative;
    min-width: 250px;
    flex: 1;
}

.autocomplete-item {
    padding: 10px 16px;
    cursor: pointer;
    border-bottom: none;
    transition: background-color 0.15s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 100%;
    display: flex;
    align-items: center;
}

.autocomplete-item:last-child {
    border-bottom: none;
}

.autocomplete-item:hover {
    background-color: #f5f5f5;
}

.autocomplete-item.active {
    background-color: #e8e8e8;
}

.autocomplete-item-label {
    font-weight: 400;
    color: #212121;
    font-size: 15px;
    white-space: nowrap;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.5;
}

.autocomplete-item-type {
    font-size: 12px;
    color: #757575;
    margin-left: 8px;
}

.btn-search {
    background: linear-gradient(135deg, #1E58A7 0%, #223E7E 100%);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-search:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(30, 88, 167, 0.3);
}

.btn-clear {
    background: #e2e8f0;
    color: #4a5568;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-clear:hover {
    background: #cbd5e0;
}

/* Business List */
.business-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 40px;
}

.business-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: row;
    align-items: stretch;
}

.business-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.business-image-wrapper {
    width: 200px;
    min-width: 200px;
    height: auto;
    overflow: hidden;
    background: linear-gradient(135deg, #1E58A7 0%, #223E7E 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.business-image {
    width: 100%;
    height: 100%;
    min-height: 180px;
    object-fit: cover;
}

.business-image-placeholder {
    color: white;
    font-size: 48px;
    padding: 40px;
}

.business-card-body {
    padding: 25px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.business-name {
    font-size: 24px;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 12px;
    line-height: 1.3;
}

.business-type {
    display: inline-block;
    background: #e6fffa;
    color: #234e52;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 12px;
}

.business-description {
    color: #718096;
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.business-location {
    display: flex;
    align-items: center;
    color: #4a5568;
    font-size: 14px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e2e8f0;
}

.business-location i {
    margin-right: 8px;
    color: #1E58A7;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.empty-state-icon {
    font-size: 64px;
    color: #cbd5e0;
    margin-bottom: 20px;
}

.empty-state h3 {
    color: #4a5568;
    margin-bottom: 10px;
}

.empty-state p {
    color: #718096;
}

/* Pagination */
.pagination-wrapper {
    display: flex;
    justify-content: center;
    margin-top: 40px;
}

.pagination {
    display: flex;
    gap: 8px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.pagination li {
    display: inline-block;
}

.pagination a,
.pagination span {
    display: block;
    padding: 10px 16px;
    border-radius: 8px;
    text-decoration: none;
    color: #4a5568;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid #e2e8f0;
    background: white;
}

.pagination a:hover {
    background: #1E58A7;
    color: white;
    border-color: #1E58A7;
}

.pagination .active span {
    background: linear-gradient(135deg, #1E58A7 0%, #223E7E 100%);
    color: white;
    border-color: #1E58A7;
}

.pagination .disabled span {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Results Count */
.results-count {
    color: #718096;
    font-size: 14px;
    margin-bottom: 20px;
}

.results-count strong {
    color: #2d3748;
}

/* Responsive */
@media (max-width: 768px) {
    .search-filter-row {
        flex-direction: column;
    }

    .search-box-wrapper,
    .area-filter-wrapper {
        min-width: 100%;
    }

    .business-card {
        flex-direction: column;
    }

    .business-image-wrapper {
        width: 100%;
        height: 200px;
        min-width: auto;
    }

    .business-image {
        min-height: 200px;
    }

    .page-header h1 {
        font-size: 28px;
    }
}

/* ============================================
   Show Page Specific Styles
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800;900&display=swap');

* {
    -webkit-font-smoothing: antialiased;
    box-sizing: border-box;
}

html, body {
    margin: 0px;
    height: 100%;
    overflow-x: hidden;
}

button:focus-visible {
    outline: 2px solid #1E58A7 !important;
    outline: -webkit-focus-ring-color auto 5px !important;
}

a {
    text-decoration: none;
}

/* Lightbox Styles */
#lightboxModal {
    animation: fadeIn 0.3s ease-in-out;
}

#lightboxImage {
    animation: zoomIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes zoomIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Prevent image dragging in lightbox */
#lightboxImage {
    user-select: none;
    -webkit-user-drag: none;
    pointer-events: none;
}

/* Product Card Animations */
.product-card {
    animation: fadeInUp 0.4s ease-out forwards;
    opacity: 0;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Products Grid Fade Transition */
#productsGrid {
    transition: opacity 0.3s ease-in-out;
}

#productsGrid.fade-out {
    opacity: 0;
}

#productsGrid.fade-in {
    opacity: 1;
}

/* Service Card Animations */
.service-card {
    animation: fadeInUp 0.4s ease-out forwards;
    opacity: 0;
}

/* Services Grid Fade Transition */
#servicesGrid {
    transition: opacity 0.3s ease-in-out;
}

#servicesGrid.fade-out {
    opacity: 0;
}

#servicesGrid.fade-in {
    opacity: 1;
}

/* Stagger animation delay for cards */
.product-card:nth-child(1) { animation-delay: 0.05s; }
.product-card:nth-child(2) { animation-delay: 0.1s; }
.product-card:nth-child(3) { animation-delay: 0.15s; }
.product-card:nth-child(4) { animation-delay: 0.2s; }
.product-card:nth-child(5) { animation-delay: 0.25s; }
.product-card:nth-child(6) { animation-delay: 0.3s; }

.service-card:nth-child(1) { animation-delay: 0.05s; }
.service-card:nth-child(2) { animation-delay: 0.1s; }
.service-card:nth-child(3) { animation-delay: 0.15s; }
.service-card:nth-child(4) { animation-delay: 0.2s; }
.service-card:nth-child(5) { animation-delay: 0.25s; }
.service-card:nth-child(6) { animation-delay: 0.3s; }

/* Document Card Animations */
.document-card {
    animation: fadeInUp 0.4s ease-out forwards;
    opacity: 0;
}

/* Documents Grid Fade Transition */
#documentsGrid {
    transition: opacity 0.3s ease-in-out;
}

#documentsGrid.fade-out {
    opacity: 0;
}

#documentsGrid.fade-in {
    opacity: 1;
}

.document-card:nth-child(1) { animation-delay: 0.05s; }
.document-card:nth-child(2) { animation-delay: 0.1s; }

/* Hide scrollbar for tab navigation */
.scrollbar-hide {
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}
.scrollbar-hide::-webkit-scrollbar {
    display: none;  /* Chrome, Safari and Opera */
}