/* ============================================
   Accounting Office List Page Styles
   Color Theme: Matching website colors (#50bfda, #e21111)
   ============================================ */

/* Page Container */
.accounting-office-page {
    position: relative;
    display: block;
    padding: 60px 0;
    background: #fff;
}

/* Page Header */
.accounting-office-header {
    position: relative;
    display: block;
    margin-bottom: 40px;
    text-align: center;
}

.accounting-office-title {
    font-size: 36px;
    font-weight: 600;
    line-height: 1.2;
    color: #212529;
    margin-bottom: 15px;
    font-family: "Mitr", sans-serif;
    position: relative;
}

.accounting-office-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: #50bfda;
    border-radius: 2px;
}

.accounting-office-subtitle {
    font-size: 16px;
    color: #6c757d;
    max-width: 600px;
    margin: 20px auto 30px; /* Increased bottom margin for button spacing */
    font-family: "Mitr", sans-serif;
}

.btn-post-free {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 30px;
    background: linear-gradient(135deg, #FF6B6B 0%, #EE5253 100%);
    color: #fff;
    font-family: "Mitr", sans-serif;
    font-size: 16px;
    font-weight: 500;
    text-decoration: none;
    border-radius: 50px; /* Pill shape */
    box-shadow: 0 4px 15px rgba(238, 82, 83, 0.4);
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.btn-post-free:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(238, 82, 83, 0.5);
    background: linear-gradient(135deg, #EE5253 0%, #FF6B6B 100%); /* Reverse gradient on hover */
    color: #fff;
}

.btn-post-free i {
    font-size: 18px;
}

/* Search and Filter Section - Compact Redesign */
.accounting-office-search {
    position: relative;
    display: block;
    background: #ffffff;
    border-radius: 50px; /* Fully rounded pill shape */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
    margin-bottom: 30px;
    padding: 8px 10px; /* Minimal padding */
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.accounting-office-search:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
}

.search-filter-form {
    display: flex;
    gap: 0; /* Remove gap, use borders/padding inside instead if needed, or small gap */
    align-items: center;
    width: 100%;
}

.search-filter-form .form-control {
    flex: 2; /* Main search takes more space */
    min-width: 200px;
    padding: 10px 20px;
    border: none;
    background: transparent;
    border-radius: 0;
    font-size: 15px;
    transition: all 0.3s ease;
    font-family: "Mitr", sans-serif;
    border-right: 1px solid #e9ecef; /* Separator */
}

.search-filter-form .form-control:focus {
    outline: none;
    box-shadow: none;
}

.search-filter-form .form-select {
    flex: 1;
    min-width: 150px;
    padding: 10px 15px;
    border: none;
    background: transparent;
    border-radius: 0;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: "Mitr", sans-serif;
    border-right: 1px solid #e9ecef; /* Separator */
}

.search-filter-form .form-select:last-of-type {
    border-right: none;
}

.search-filter-form .form-select:focus {
    outline: none;
    box-shadow: none;
    background-color: rgba(80, 191, 218, 0.05);
}

.btn-search {
    background: #50bfda;
    color: #ffffff;
    border: none;
    padding: 10px 25px;
    border-radius: 40px; /* Button inside pill */
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: "Mitr", sans-serif;
    margin-left: 5px;
    white-space: nowrap;
}

.btn-search:hover {
    background: #3da8c4;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(80, 191, 218, 0.3);
}

/* Results Header */
/* Results Header - Minimalist Redesign */
.results-header {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding: 0 10px; /* Slight padding to align with content */
    background: transparent; /* Transparent background */
    border-radius: 0;
    box-shadow: none;
    border: none;
    flex-wrap: wrap;
    gap: 15px;
}

.results-count {
    font-size: 16px;
    font-weight: 500;
    color: #6c757d; /* Softer color */
    margin: 0;
    font-family: "Mitr", sans-serif;
}

.results-count strong {
    color: #212529; /* Highlight number */
    font-size: 18px;
    font-weight: 600;
}

.sort-select .form-select {
    appearance: none;
    background: #ffffff;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 8px 35px 8px 15px;
    font-size: 16px;
    font-weight: 500;
    color: #212529;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 180px;
    font-family: "Mitr", sans-serif;
}

.sort-select .form-select:focus {
    outline: none;
    border-color: #50bfda;
    box-shadow: 0 0 0 3px rgba(80, 191, 218, 0.1);
}

/* Office Card Grid */
.office-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

/* Office Card */
.office-card {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.office-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.office-card-image {
    position: relative;
    height: 200px;
    overflow: hidden;
    flex-shrink: 0;
}

.office-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.office-card:hover .office-card-image img {
    transform: scale(1.05);
}

.office-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #50bfda;
    color: #ffffff;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    box-shadow: 0 4px 10px rgba(80, 191, 218, 0.3);
    font-family: "Mitr", sans-serif;
}

.office-badge.premium {
    background: linear-gradient(135deg, #e21111 0%, #c41e3a 100%);
    box-shadow: 0 4px 10px rgba(226, 17, 17, 0.3);
}

.office-badge.new {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    box-shadow: 0 4px 10px rgba(40, 167, 69, 0.3);
}

/* Verified Badge - Match View Page */
.office-verified-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 2px 10px;
    background: #d1fae5;
    color: #059669;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 500;
    border: 1px solid #a7f3d0;
    font-family: "Mitr", sans-serif;
    margin-bottom: 5px;
}

/* Office Type Badge - Match View Page */
.office-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 500;
    font-family: "Mitr", sans-serif;
    margin-right: 5px;
}

.office-type-company {
    background: #ede9fe;
    color: #7c3aed;
    border: 1px solid #c4b5fd;
}

.office-type-individual {
    background: #fef3c7;
    color: #d97706;
    border: 1px solid #fcd34d;
}

.office-card-content {
    padding: 25px 20px;
    background: #fff;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.office-name {
    font-size: 18px;
    font-weight: 600;
    color: #212529;
    margin-bottom: 12px;
    line-height: 1.3;
    font-family: "Mitr", sans-serif;
}

.office-name a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.office-name a:hover {
    color: #e21111;
}

.office-location {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: #6c757d;
    font-size: 14px;
    margin-bottom: 15px;
    font-family: "Mitr", sans-serif;
}

.office-location i {
    color: #50bfda;
    margin-top: 3px;
}

.office-services {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

/* Industry/Service Tags */
.office-services {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 15px;
}

.office-tag {
    display: inline-block;
    padding: 4px 10px;
    background: #f8f9fa;
    color: #495057;
    border-radius: 6px;
    font-size: 11px;
    border: 1px solid #e9ecef;
    font-family: "Mitr", sans-serif;
}

.office-tag:hover {
    background: #fff;
    border-color: #50bfda;
    color: #50bfda;
}

.office-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

.office-rating {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: "Mitr", sans-serif;
}

.rating-stars {
    display: flex;
    gap: 3px;
}

.rating-stars i {
    color: #ffc107;
    font-size: 14px;
}

.rating-stars i.empty {
    color: #e9ecef;
}

.rating-score {
    font-weight: 600;
    color: #212529;
    font-size: 14px;
}

.rating-count {
    color: #6c757d;
    font-size: 12px;
}

.office-contact {
    display: flex;
    gap: 10px;
}

.contact-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.contact-btn.phone {
    background: #e8f5e9;
    color: #28a745;
}

.contact-btn.phone:hover {
    background: #28a745;
    color: #ffffff;
    transform: scale(1.1);
}

.contact-btn.line {
    background: #e8f5e9;
    color: #00c300;
}

.contact-btn.line:hover {
    background: #00c300;
    color: #ffffff;
    transform: scale(1.1);
}

.contact-btn.email {
    background: #e3f2fd;
    color: #50bfda;
}

.contact-btn.email:hover {
    background: #50bfda;
    color: #ffffff;
    transform: scale(1.1);
}

/* View Detail Button */
.office-view-btn {
    display: block;
    text-align: center;
    padding: 15px;
    background: #50bfda;
    color: #ffffff;
    text-decoration: none;
    font-weight: 500;
    font-size: 16px;
    transition: all 0.3s ease;
    font-family: "Mitr", sans-serif;
}

.office-view-btn:hover {
    background: #3da8c4;
    color: #ffffff;
}

.office-view-btn i {
    margin-left: 8px;
    transition: transform 0.3s ease;
}

.office-view-btn:hover i {
    transform: translateX(5px);
}

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

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

.pagination .page-item .page-link {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    border: 2px solid #e9ecef;
    color: #6c757d;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    font-family: "Mitr", sans-serif;
}

.pagination .page-item .page-link:hover {
    border-color: #50bfda;
    color: #50bfda;
    background: rgba(80, 191, 218, 0.1);
}

.pagination .page-item.active .page-link {
    background: #50bfda;
    border-color: #50bfda;
    color: #ffffff;
}

.pagination .page-item.disabled .page-link {
    opacity: 0.5;
    cursor: not-allowed;
}

/* No Results State */
.no-results {
    text-align: center;
    padding: 80px 20px;
}

.no-results-icon {
    font-size: 5rem;
    color: #e9ecef;
    margin-bottom: 25px;
}

.no-results h3 {
    font-size: 1.5rem;
    color: #212529;
    margin-bottom: 10px;
    font-family: "Mitr", sans-serif;
}

.no-results p {
    color: #6c757d;
    margin-bottom: 25px;
    font-family: "Mitr", sans-serif;
}

.btn-reset {
    background: #50bfda;
    color: #ffffff;
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: "Mitr", sans-serif;
}

.btn-reset:hover {
    background: #3da8c4;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(80, 191, 218, 0.3);
}

/* Province Filter Pills */
.province-filter {
    margin-bottom: 30px;
}

.province-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.province-pill {
    padding: 8px 20px;
    border-radius: 25px;
    border: 2px solid #e9ecef;
    background: #ffffff;
    color: #6c757d;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: "Mitr", sans-serif;
}

.province-pill:hover {
    border-color: #50bfda;
    color: #50bfda;
    background: rgba(80, 191, 218, 0.1);
}

.province-pill.active {
    background: #50bfda;
    border-color: #50bfda;
    color: #ffffff;
}

/* Map Section */
.map-section {
    background: #ffffff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #e9ecef;
    margin-bottom: 40px;
}

.map-container {
    height: 400px;
    border-radius: 12px;
    overflow: hidden;
    background: #f8f9fa;
}

/* Responsive Styles */
@media (max-width: 991px) {
    .accounting-office-title {
        font-size: 28px;
    }
    
    .office-cards-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
}

@media (max-width: 767px) {
    .accounting-office-page {
        padding: 40px 0 60px;
    }
    
    .accounting-office-title {
        font-size: 24px;
    }
    
    .search-filter-form {
        flex-direction: column;
    }
    
    .search-filter-form .form-control,
    .search-filter-form .form-select {
        width: 100%;
    }
    
    .btn-search {
        width: 100%;
        justify-content: center;
        margin-left: 0;
        margin-top: 10px;
    }
    
    .accounting-office-search {
        border-radius: 12px;
        padding: 15px;
    }

    .search-filter-form .form-control,
    .search-filter-form .form-select {
        border-right: none;
        border-bottom: 1px solid #e9ecef;
        padding: 12px;
    }
    
    .office-cards-grid {
        grid-template-columns: 1fr;
    }
    
    .results-header {
        flex-direction: column;
        text-align: center;
        align-items: center; /* Center items */
        gap: 10px;
    }

    .results-count {
        width: 100%;
    }

    .sort-select {
        width: 100%;
        display: flex;
        justify-content: center;
    }

    .province-pills {
        gap: 8px;
    }

    .province-pill {
        padding: 6px 14px;
        font-size: 13px;
    }
}
