.community-card {
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 16px;
    box-shadow: 0 6px 18px rgba(31, 41, 55, 0.08);
    cursor: pointer;
}

.community-group-btn {
    text-decoration: none;
    display: inline-flex;
}

.community-group-filters {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.community-group-filters-primary {
    margin-bottom: 0;
}

.community-group-filters-groups {
    margin-bottom: 0;
}

.community-group-thumb {
    position: relative;
    width: 170px;
    height: 170px;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: #111827;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.community-group-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 12px;
}

.community-group-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #ffffff;
    font-size: 2.5rem;
}

.community-group-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        145deg,
        rgba(15, 23, 42, 0.82) 0%,
        rgba(15, 23, 42, 0.18) 42%,
        rgba(15, 23, 42, 0.18) 58%,
        rgba(15, 23, 42, 0.82) 100%
    );
    color: #ffffff;
    pointer-events: none;
}

.community-group-title {
    position: absolute;
    top: 0.65rem;
    left: 0.75rem;
    right: 2.5rem;
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.15;
    text-align: left;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.community-group-count {
    position: absolute;
    right: 0.75rem;
    bottom: 0.65rem;
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1;
    text-align: right;
}

.community-group-btn:hover .community-group-thumb {
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(15, 23, 42, 0.18);
}

.community-group-btn.is-active .community-group-thumb {
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.35);
}

.community-card-fixed {
    height: 100%;
    min-height: 400px;
}

.community-card-author-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.community-card-group-row {
    font-size: 0.85rem;
    color: #6b7280;
}

.community-card-group-link {
    color: #6b7280;
    text-decoration: none;
}

.community-card-group-link:hover {
    text-decoration: underline;
}

.community-card-avatar-wrap {
    flex: 0 0 auto;
}

.community-card-avatar,
.community-card-avatar-fallback {
    width: 28px;
    height: 28px;
    border-radius: 999px;
}

.community-card-avatar {
    object-fit: cover;
    display: block;
}

.community-card-avatar-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: #ffffff;
    background: #6b7280;
}

.community-card-author-link {
    color: #111827;
    text-decoration: none;
}

.community-card-author-link:hover {
    text-decoration: underline;
}

.community-card-date-row {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.community-card-date-rel:empty {
    display: none;
}

.community-card-date-rel::before {
    content: "•";
    margin-right: 0.4rem;
    opacity: 0.6;
}

.community-author-filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding-right: 0.5rem;
}

.community-author-filter-chip-avatar {
    width: 22px;
    height: 22px;
    border-radius: 999px;
    object-fit: cover;
    display: block;
    flex: 0 0 auto;
}

.community-author-filter-chip-text {
    display: inline-block;
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.community-author-filter-chip-count {
    font-weight: 600;
    margin-left: 0.15rem;
}

.community-author-filter-chip-x {
    margin-left: auto;
    width: 18px;
    height: 18px;
    line-height: 16px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    border: 1px solid rgba(15, 23, 42, 0.18);
    opacity: 0.8;
}

.community-author-filter-chip:hover .community-author-filter-chip-x {
    opacity: 1;
}

.community-thumb {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.community-text {
    font-size: 0.95rem;
    color: #1f2937;
    min-height: 1.3rem;
}

.community-hashtag {
    color: #2563eb;
}

.community-meta {
    display: flex;
    gap: 16px;
    align-items: center;
}

.community-modal-text {
    white-space: pre-wrap;
    color: #1f2937;
    font-size: 0.98rem;
}

.community-modal-date {
    color: #1f2937;
    opacity: 0.7;
}

.community-modal-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #6b7280;
    font-size: 0.9rem;
}

.community-modal-dialog {
    max-width: 820px;
    width: 820px;
}

@media (max-width: 900px) {
    .community-modal-dialog {
        width: calc(100% - 2rem);
        max-width: calc(100% - 2rem);
    }
}

.community-modal-comments-title {
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.community-modal-comments-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.community-modal-comment {
    padding: 0.65rem 0.75rem;
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.04);
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
}

.community-modal-comment-avatar-wrap {
    flex: 0 0 auto;
}

.community-modal-comment-avatar,
.community-modal-comment-avatar-fallback {
    width: 36px;
    height: 36px;
    border-radius: 999px;
}

.community-modal-comment-avatar {
    object-fit: cover;
    display: block;
}

.community-modal-comment-avatar-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
    color: #ffffff;
    background: #6b7280;
}

.community-modal-comment-content {
    flex: 1 1 auto;
    min-width: 0;
}

.community-modal-comment-author {
    font-weight: 600;
    color: #111827;
    margin-bottom: 0.25rem;
}

.community-modal-comment-text {
    color: #1f2937;
    margin-bottom: 0.25rem;
    white-space: pre-wrap;
}

.community-modal-comment-date {
    font-size: 0.85rem;
    color: #6b7280;
}

.community-modal-comment-attachment {
    border: none;
    background: transparent;
    padding: 0;
    margin-bottom: 0.35rem;
    cursor: pointer;
}

.community-modal-comment-attachment-thumb {
    width: 100%;
    max-width: 220px;
    max-height: 160px;
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid rgba(15, 23, 42, 0.12);
}

.community-modal-image-full {
    width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 14px;
}

.community-modal-comment-empty {
    font-size: 0.9rem;
    color: #6b7280;
}

.community-day-group {
    margin-bottom: 1.5rem;
}

.community-day-toggle {
    width: 100%;
    border: none;
    background: rgba(15, 23, 42, 0.04);
    padding: 0.6rem 1rem;
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #1f2937;
    font-weight: 600;
}

.community-day-toggle:hover {
    background: rgba(15, 23, 42, 0.08);
}

.community-day-count {
    color: #6b7280;
    font-weight: 500;
}

.community-day-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.community-day-scrape-btn {
    line-height: 1.1;
}

.community-day-group.is-collapsed .community-day-posts {
    display: none;
}

.community-day-loading {
    width: 100%;
    text-align: center;
    color: #6b7280;
    font-size: 0.9rem;
    padding: 0.75rem 0;
}

.mosaic-grid {
    display: grid;
    gap: 6px;
}

.mosaic-grid[data-use-ratio="true"] {
    grid-auto-rows: auto;
}

.mosaic-item {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    min-height: 140px;
    background: #f3f4f6;
    aspect-ratio: var(--ratio, 1 / 1);
}

.mosaic-item[data-has-ratio="true"] {
    min-height: 0;
}

.mosaic-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 12px;
}

.mosaic-count-1 {
    grid-template-columns: 1fr;
}

.mosaic-count-1 .mosaic-item {
    min-height: 320px;
}

.mosaic-count-2 {
    grid-template-columns: repeat(2, 1fr);
}

.mosaic-count-2 .mosaic-item {
    min-height: 180px;
}

.mosaic-grid[data-use-ratio="true"].mosaic-count-2 {
    grid-template-rows: auto;
}

.mosaic-count-3 {
    grid-template-columns: 2fr 1fr;
    grid-template-rows: repeat(2, 160px);
}

.mosaic-count-3 .mosaic-item:first-child {
    grid-row: span 2;
}

.mosaic-count-4 {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 160px);
}

.mosaic-grid[data-use-ratio="true"].mosaic-count-3,
.mosaic-grid[data-use-ratio="true"].mosaic-count-4 {
    grid-template-rows: auto;
}

.mosaic-grid[data-use-ratio="true"] .mosaic-item {
    height: auto;
    min-height: 0;
}

.mosaic-count-1 .mosaic-item[data-has-ratio="true"],
.mosaic-count-2 .mosaic-item[data-has-ratio="true"] {
    min-height: 0;
}

.mosaic-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    color: #ffffff;
    font-size: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.community-company-logos-grid {
    --community-logo-card-radius: 14px;
}

.community-company-logo-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.55rem;
    text-decoration: none;
    color: inherit;
    height: 100%;
    padding: 0.35rem;
    border-radius: var(--community-logo-card-radius);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.community-company-logo-card:hover {
    transform: translateY(-2px);
    color: inherit;
}

.community-company-logo-card-image-wrap {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: var(--community-logo-card-radius);
    overflow: hidden;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: #f8fafc;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
}

.community-company-logo-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.community-company-logo-card-name {
    display: block;
    width: 100%;
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.25;
    text-align: center;
    word-break: break-word;
}

.community-company-contacts {
    --community-contacts-logo-size: 280px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 16px;
    overflow: hidden;
}

.community-company-contacts-inner {
    display: flex;
    align-items: flex-start;
    gap: 1.15rem;
    padding: 1rem 1.15rem;
}

.community-company-contacts-logo-col {
    flex: 0 0 auto;
    width: var(--community-contacts-logo-size);
    height: var(--community-contacts-logo-size);
    max-width: min(var(--community-contacts-logo-size), 70vw);
    max-height: min(var(--community-contacts-logo-size), 70vw);
    overflow: hidden;
    border-radius: 14px;
}

.community-company-contacts-logo {
    display: block;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
    border-radius: 14px;
    border: 1px solid rgba(15, 23, 42, 0.1);
}

.community-company-contacts-body {
    flex: 1 1 auto;
    min-width: 0;
}

.community-company-contacts-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.65rem;
}

.community-company-contacts-title {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.community-company-contacts-name {
    margin-bottom: 0.5rem;
}

.community-company-contacts-list {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.community-company-contacts-item {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    font-size: 0.95rem;
}

.community-company-contacts-phone-icon {
    color: #198754;
    width: 1.1rem;
    text-align: center;
    flex: 0 0 1.1rem;
}

.community-company-contacts-email-emoji,
.community-company-contacts-address-icon,
.community-company-contacts-social-icon {
    width: 1.1rem;
    text-align: center;
    flex: 0 0 1.1rem;
}

.community-company-contacts-item-label {
    font-weight: 600;
}

.community-company-contacts-address-icon {
    width: 1.25rem;
    text-align: center;
    color: #64748b;
}

.community-company-contacts-address .community-company-contacts-item-text a {
    white-space: pre-line;
}

.community-company-contacts-item-text a {
    text-decoration: none;
}

.community-company-contacts-item-text a:hover {
    text-decoration: underline;
}

.community-company-modal-loading {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.82);
    border-radius: 0.75rem;
}

.community-company-modal-loading-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    text-align: center;
    padding: 1rem;
}

#communityCompanyContactsModal .modal-body {
    position: relative;
}

.community-company-logo-preview-wrap {
    width: 120px;
    height: 120px;
}

.community-company-logo-preview,
.community-company-logo-preview-placeholder {
    width: 120px;
    height: 120px;
    border-radius: 14px;
    border: 1px dashed rgba(15, 23, 42, 0.18);
    object-fit: cover;
}

.community-company-logo-preview-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    font-size: 2rem;
    background: rgba(15, 23, 42, 0.03);
}

.community-company-banner-preview-wrap {
    width: 100%;
    max-width: 420px;
}

#communityCompanyContactsModal .community-company-modal-media-col {
    text-align: left;
}

#communityCompanyContactsModal .community-company-modal-media-col .community-company-banner-preview-wrap {
    max-width: 100%;
}

.community-company-banner-preview {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 14px;
    border: 1px dashed rgba(15, 23, 42, 0.18);
    object-fit: contain;
}

.community-company-geocode-status {
    padding: 0.45rem 0.65rem;
    border-radius: 0.5rem;
    border: 1px solid transparent;
}

.community-company-geocode-status.is-pending {
    color: #475569;
    background: rgba(148, 163, 184, 0.12);
    border-color: rgba(148, 163, 184, 0.25);
}

.community-company-geocode-status.is-ok {
    color: #166534;
    background: rgba(34, 197, 94, 0.12);
    border-color: rgba(34, 197, 94, 0.28);
}

.community-company-geocode-status.is-failed {
    color: #991b1b;
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.25);
}

.community-company-banner-preview-placeholder {
    width: 100%;
    min-height: 96px;
    border-radius: 14px;
    border: 1px dashed rgba(15, 23, 42, 0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    font-size: 2rem;
    background: rgba(15, 23, 42, 0.03);
}

.community-company-banner-section {
    margin-top: 1.5rem;
}

.community-author-posts-show-more-wrap {
    margin-top: 0.35rem;
    margin-bottom: 0.75rem;
}

.community-author-posts-show-more-btn {
    font-weight: 600;
    text-decoration: none;
}

.community-author-posts-show-more-btn:hover {
    text-decoration: underline;
}

.community-company-banner {
    width: 100%;
    height: auto;
    max-height: 250px;
    display: block;
    border-radius: 16px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 6px 18px rgba(31, 41, 55, 0.08);
    object-fit: contain;
}

.community-company-service-catalog {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.community-company-service-group-heading {
    font-size: 0.82rem;
    font-weight: 600;
    color: #475569;
    margin: 0.15rem 0 0.1rem;
}

.community-company-service-catalog-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.community-company-service-card {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    min-width: 7.5rem;
    max-width: 10rem;
    padding: 0.55rem 0.65rem;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 0.5rem;
    background: #fff;
    color: #1e293b;
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.25;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.community-company-service-card:hover {
    border-color: rgba(34, 197, 94, 0.45);
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}

.community-company-service-card.is-selected,
.community-company-service-card.is-offered {
    background: rgba(34, 197, 94, 0.18);
    border-color: rgba(22, 163, 74, 0.65);
    color: #14532d;
}

.community-company-contacts-services-heading-emoji,
.community-company-contacts-social-heading-emoji {
    margin-right: 0.15rem;
}

.community-company-contacts-social-list {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.community-company-contacts-service-emoji {
    width: 1.1rem;
    text-align: center;
    flex: 0 0 1.1rem;
    font-size: 1rem;
    line-height: 1;
}

.community-company-contacts-service[data-bs-toggle="tooltip"] {
    cursor: help;
}

.community-company-service-card-emoji {
    font-size: 1.35rem;
    line-height: 1;
}

.community-company-service-card-title {
    word-break: break-word;
}

.community-company-emoji-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.community-company-emoji-pick-btn {
    min-width: 2rem;
    padding: 0.15rem 0.35rem;
    font-size: 1.1rem;
    line-height: 1.2;
}

.community-company-service-descriptions {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.community-company-service-description-row {
    padding: 0.5rem 0.65rem;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 0.4rem;
    background: #f8fafc;
}

.community-company-catalog-section .community-company-catalog-editor {
    border-color: rgba(15, 23, 42, 0.1) !important;
}

.community-company-services-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.community-company-service-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.15rem;
    border: 1px solid rgba(59, 130, 246, 0.35);
    background: rgba(59, 130, 246, 0.08);
    color: #1e3a8a;
    border-radius: 999px;
    padding: 0.2rem 0.65rem;
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.35;
    cursor: default;
}

.community-company-service-chip-emoji {
    font-size: 0.95rem;
    line-height: 1;
}

.community-company-service-chip[data-bs-toggle="tooltip"] {
    cursor: help;
}

.community-company-repeat-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.community-company-repeat-row {
    display: grid;
    grid-template-columns: minmax(120px, 0.9fr) minmax(160px, 1.4fr) auto;
    gap: 0.5rem;
    align-items: center;
}

.community-company-phone-row {
    grid-template-columns: minmax(120px, 0.9fr) minmax(160px, 1.4fr) auto auto;
}

.community-company-phone-row .community-company-phone-commercial-wrap {
    white-space: nowrap;
}

@media (max-width: 767.98px) {
    .community-company-contacts-inner {
        flex-direction: column;
        align-items: stretch;
    }

    .community-company-contacts-logo-col {
        width: min(var(--community-contacts-logo-size), 70vw) !important;
        height: min(var(--community-contacts-logo-size), 70vw) !important;
        aspect-ratio: 1;
    }

    .community-company-contacts-logo {
        width: 100%;
        height: 100%;
    }

    .community-company-repeat-row {
        grid-template-columns: 1fr;
    }
}

.community-search-wrap {
    flex: 0 1 auto;
    min-width: min(100%, 280px);
    max-width: 360px;
    margin-left: auto;
}

.community-search-input-group {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.35rem 0.65rem 0.35rem 0.55rem;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
}

.community-search-icon {
    flex: 0 0 auto;
    font-size: 1rem;
    line-height: 1;
    opacity: 0.72;
}

.community-search-input {
    flex: 1 1 auto;
    min-width: 0;
    border: 0;
    box-shadow: none;
    padding: 0.15rem 0;
    background: transparent;
}

.community-search-input:focus {
    border: 0;
    box-shadow: none;
    outline: none;
}

.community-search-clear-btn {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.35rem;
    height: 1.35rem;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.08);
    color: #475569;
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
}

.community-search-clear-btn:hover {
    background: rgba(15, 23, 42, 0.14);
    color: #0f172a;
}

.community-search-clear-btn.is-empty {
    opacity: 0.45;
    cursor: default;
}

.community-search-clear-btn.is-empty:hover {
    background: rgba(15, 23, 42, 0.08);
    color: #475569;
}

.community-search-status {
    margin-top: -0.35rem;
}

@media (max-width: 767.98px) {
    .community-search-wrap {
        width: 100%;
        max-width: none;
        margin-left: 0;
    }
}

.community-company-location-tabs .nav-link {
    font-size: 0.875rem;
    padding: 0.45rem 0.75rem;
}

.community-company-location-panels {
    background: #f8fafc;
}

.community-company-location-display {
    padding-left: 0.15rem;
    border-left: 3px solid rgba(59, 130, 246, 0.35);
    padding-bottom: 0.15rem;
}

.community-company-location-panel-inner .community-company-geocode-status.is-ok {
    color: #166534;
}

.community-company-location-panel-inner .community-company-geocode-status.is-failed {
    color: #991b1b;
}

.community-company-location-panel-inner .community-company-geocode-status.is-pending {
    color: #92400e;
}

.form-control.pt-phone-field-error,
.form-select.pt-phone-field-error {
    animation: pt-phone-field-flash 0.5s ease-in-out 2;
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.28);
}

@keyframes pt-phone-field-flash {
    0%,
    100% {
        background-color: rgba(220, 53, 69, 0.06);
    }
    50% {
        background-color: rgba(220, 53, 69, 0.2);
    }
}
