* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

a {
    text-decoration: none;
}

html, body {
    height: 100%;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1 0 auto;
}

.footer {
    flex-shrink: 0;
}

body {
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
    padding-top: 70px; 
}

.svg-icon {
    width: 1em;
    height: 1em;
    display: inline-block;
    vertical-align: middle;
    fill: currentColor;
}

.header {
    background: linear-gradient(135deg, #2c3e50, #4a6491);
    color: white;
    height: 70px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.header-container {
    max-width: 1140px;
    width: 100%; 
    margin: 0 auto;
    padding: 0 20px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.logo {
    margin-right: 8px;
    font-size: 24px;
    font-weight: bold;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    min-width: fit-content;
}

.logo img {
    width: 32px;
    height: 32px;
}
.search-bar {
    flex: 1;
    min-width: 0;
    max-width: 600px;
    margin: 0 15px;
    position: relative;
    display: flex;
}

.search-bar input {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 8px 0 0 8px;
    font-size: 15px;
    background: rgba(255, 255, 255, 0.95);
    transition: all 0.3s;
    min-width: 0;
}

.search-bar input:focus {
    outline: none;
    background: white;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

.search-btn {
    background: #3498db;
    border: none;
    padding: 0 20px;
    border-radius: 0 8px 8px 0;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    min-width: 50px;
}

.search-btn:hover {
    background: #2980b9;
}

.search-btn .svg-icon {
    color: white;
    width: 18px;
    height: 18px;
}

.header .svg-icon {
    width: 20px;
    height: 20px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    min-width: fit-content;
}

.header-btn {
    background: transparent;
    border: none;
    color: white;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s;
    white-space: nowrap;
}

.header-btn:hover {
    background: rgba(255, 255, 255, 0.15);
}

.header-btn.active {
    background: rgba(255, 255, 255, 0.2);
}

.header-btn:active {
    background: rgba(255, 255, 255, 0.1);
}

.add-btn {
    background: #27ae60;
    color: white;
    border: none;
    padding: 10px;
    border-radius: 8px;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
}

.add-btn:hover {
    background: #2ecc71;
}

.add-btn:active {
    background: #229954;
}

.dropdown {
    position: absolute;
    top: 100%;
    right: 20px;
    width: 320px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
    max-width: calc(100vw - 20px);
    max-height: calc(100vh - 100px); 
    display: flex;
    flex-direction: column;
}



.dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(5px);
}

.dropdown-header {
    background: linear-gradient(135deg, #3498db, #2c3e50);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dropdown-title {
    font-size: 18px;
    font-weight: 600;
}

.close-dropdown {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.close-dropdown:hover {
    background: rgba(255, 255, 255, 0.3);
}

.close-dropdown:active {
    background: rgba(255, 255, 255, 0.15);
}

.dropdown-content {
    padding: 10px;
    overflow-y: auto;
    overflow-x: hidden;
    flex: 1; 
    min-height: 0; 
}

.dropdown-content::-webkit-scrollbar {
    width: 6px; 
}

.dropdown-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.dropdown-content::-webkit-scrollbar-thumb {
    background: #144E6E; 
    border-radius: 3px;
    transition: background 0.3s;
}

.dropdown-content::-webkit-scrollbar-thumb:hover {
    background: #2980b9; 
}

.dropdown-content {
    scrollbar-width: thin;
    scrollbar-color: #144E6E #f1f1f1;
}

.dropdown-content {
    scroll-behavior: smooth;
}

.categories-list, .regions-list {
    list-style: none;
}

.category-item, .region-item {
    margin-bottom: 4px;
    border-radius: 8px;
    transition: background-color 0.2s;
}

.category-item:hover,
.region-item:hover {
    background-color: #f5f7fa;
}

.category-item.expanded,
.region-item.expanded,
.has-subcategories.expanded,
.has-subregions.expanded {
    background-color: #f5f7fa !important;
}

.category-header, .region-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 10px 12px;
    cursor: pointer;
}

.category-link,
.region-link {
    color: #333;
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    flex: 1;
    display: block;
}

.category-link:hover,
.region-link:hover {
    color: #3498db;
}

.category-name, .region-name {
    color: inherit;
    font-weight: inherit;
    font-size: inherit;
}

.category-actions,
.region-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.category-count, .region-count {
    background: #ecf0f1;
    color: #2c3e50;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    min-width: 40px;
    text-align: center;
    display: inline-block;
}

.has-subcategories, .has-subregions {
    position: relative;
}

.toggle-subcategories,
.toggle-subregions {
    background: #ecf0f1;
    border: none;
    padding: 3px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    width: 29px;
    height: 29px;
    flex-shrink: 0;
}

.category-arrow, .region-arrow {
    width: 14px;
    height: 14px;
    transition: transform 0.3s ease;
    color: #2c3e50;
    flex-shrink: 0;
}

.has-subcategories.expanded .category-arrow,
.has-subregions.expanded .region-arrow,
.category-item.expanded .category-arrow,
.region-item.expanded .region-arrow {
    transform: rotate(180deg);
}

.category-arrow.rotated,
.region-arrow.rotated {
    transform: rotate(180deg);
}

.subcategories, .subregions {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    width: 100%;
}

.subcategories.expanded, 
.subregions.expanded,
.subcategories.active,
.subregions.active {
    max-height: 5000px;
}

.subcategory-item, .subregion-item {
    padding: 10px 12px;
    color: #555;
    font-size: 14px;
    transition: all 0.2s;
    cursor: pointer;
}

.subcategory-item:hover,
.subregion-item:hover {
    background-color: rgba(52, 152, 219, 0.08);
}

.subcategory-link,
.subregion-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    text-decoration: none;
    color: inherit;
}

.subcategory-link:hover,
.subregion-link:hover {
    color: #3498db;
}

.subcategory-name, .subregion-name {
    flex: 1;
}

.subcategory-count, .subregion-count {
    background: #dfe6e9;
    color: #2c3e50;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    min-width: 40px;
    text-align: center;
    display: inline-block;
    margin-right: 44px;
}
.container {
    max-width: 1140px;
    margin: 30px auto;
    padding: 0 20px;
    width: 100%;
}

.page-header {
	background: white;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 30px;
    width: 100%;
}

.controls-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.breadcrumbs {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.search-results-count {
    color: #666;
    font-size: 0.9rem;
    margin: 0;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.page-title {
    font-size: 20px;
    font-weight: 700;
    color: #2c3e50;
    flex-grow: 1;
    text-align: left;
    margin: 0 15px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.add-ads {
    background: #27ae60;
    border: none;
    color: #FFF;
    padding: 0 20px;
    border-radius: 8px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 16px;
    flex-shrink: 0;
    height: 48px; 
    white-space: nowrap;
    gap: 8px;
    line-height: 1; 
}

.add-ads:hover {
    background: #2ecc71;
    color: #FFF;
    border-color: #2ecc71;
}

.filter-btn {
    background: #f5f7fa;
    border: none;
    color: #3498db;
    padding: 0 15px;
    border-radius: 8px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 16px;
    flex-shrink: 0;
    height: 40px; 
    white-space: nowrap;
    gap: 6px;
    line-height: 1; 
}

.filter-btn:hover {
    background: #2980b9;
    color: #FFF;
    border-color: #2980b9;
}

.filter-btn.active {
    background: #3498db;
    color: white;
}

.filter-btn:hover .svg-icon {
    fill: #FFF; 
    color: #FFF; 
}

.close-filter-btn {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.close-filter-btn:hover {
    background: #c0392b;
}

.close-filter-btn:active {
    background: #a93226;
}

.clear-filter-btn {
    background: #E7913C;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.clear-filter-btn:hover {
    background: #C0752B;
}

.clear-filter-btn:active {
    background: #A96726;
}

.filter-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    padding-top: 10px;
    border-top: 2px solid #f0f0f0;
    margin-top: 20px;
    flex-wrap: wrap;
}


.filter-panel {
    background: white;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    display: none;
    animation: slideDown 0.3s ease-out;
}

.filter-panel.active {
    display: block;
}

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

.filter-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-group label {
    font-weight: 600;
    color: #2c3e50;
    font-size: 14px;
}

.filter-group select,
.filter-group input {
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s;
    background: white;
    width: 100%;
}

.filter-group select:focus,
.filter-group input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.filter-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    padding-top: 10px;
    border-top: 2px solid #f0f0f0;
    margin-top: 20px;
}

.apply-filter-btn,
.reset-filter-btn {
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.apply-filter-btn {
    background: #2ecc71;
    color: white;
}

.apply-filter-btn:hover {
    background: #27ae60;
}

.reset-filter-btn {
    background: #ecf0f1;
    color: #2c3e50;
}

.reset-filter-btn:hover {
    background: #d5dbdb;
}

.announcements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

.announcement-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.announcement-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.announcements-grid:not(.list-view) .card-image {
    width: 100%;
    height: clamp(160px, 28.6vw, 220px);
    background: linear-gradient(135deg, #3498db 0%, #2c3e50 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 48px;
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
    overflow: hidden;
    border-radius: 8px 8px 0 0;
}

.announcements-grid:not(.list-view) .card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.announcements-grid:not(.list-view) .card-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.card-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.badge {
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.badge-category {
    background: #e3f2fd;
    color: #1976d2;
}

.badge-subcategory {
    background: #f3e5f5;
    color: #7b1fa2;
}

.badge-region {
    background: #fff3e0;
    color: #e65100;
}

.card-info {
    flex: 1;
    min-width: 0;
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #2c3e50;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
}

.card-description {
    font-size: 14px;
    color: #7f8c8d;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 10px;
    flex: 1;
}

.card-description.expanded {
    -webkit-line-clamp: unset;
    display: block;
    max-height: 200px;
    overflow-y: auto;
}

.show-more-btn {
    background: none;
    border: none;
    color: #3498db;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    margin-top: 5px;
    transition: color 0.3s;
    text-align: left;
    display: inline-block;
}

.show-more-btn:hover {
    color: #2980b9;
    text-decoration: underline;
}

.card-meta {
    margin: 10px 0;
}

.card-date {
    font-size: 12px;
    color: #95a5a6;
    font-weight: 500;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 15px;
    border-top: 1px solid #ecf0f1;
    flex-wrap: nowrap;
    gap: 15px;
}

.card-price {
    font-size: 24px;
    font-weight: 700;
    color: #27ae60;
    margin: 0;
    white-space: nowrap;
    flex-shrink: 0;
}

.contact-btn {
    background: #3498db;
    color: white;
    border: none;
    padding: 10px 50px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
}


.contact-btn:hover {
    background: #2980b9;
}

.view-toggle {
    display: flex;
    gap: 0;
    background: white;
    border-radius: 8px;
    flex-shrink: 0;
    border: 1px solid #3498db;
    overflow: hidden;
}

.view-btn {
    background: transparent;
    border: none;
    color: #7f8c8d;
    padding: 0;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
}

.view-btn:hover {
    background: #e8f4f8;
}

.view-btn:active {
    background: #d1e7f0;
}

.view-btn.active {
    background: #3498db;
    color: white;
}

.view-btn .svg-icon {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.announcements-grid.grid-view {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

.announcements-grid.list-view {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.announcements-grid.list-view .announcement-card {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    min-height: 180px;
}

.announcements-grid.list-view .card-image {
    width: 240px;
    min-width: 240px;
    height: auto;
    flex-shrink: 0;
    margin-right: 20px;
    background: linear-gradient(135deg, #3498db 0%, #2c3e50 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 48px;
    cursor: pointer;
    overflow: hidden;
    border-radius: 8px 0 0 8px;
}

.announcements-grid.list-view .card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.announcements-grid.list-view .card-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 20px;
    min-width: 0;
}

.announcements-grid.list-view .card-badges {
    margin-bottom: 10px;
}

.announcements-grid.list-view .card-info {
    flex: 1;
    padding: 0;
}

.announcements-grid.list-view .card-title {
    font-size: 1.25rem;
    margin-bottom: 8px;
}

.announcements-grid.list-view .card-description {
    margin-bottom: 12px;
    max-height: 60px;
    overflow: hidden;
}

.announcements-grid.list-view .card-meta {
    margin-bottom: 10px;
}

.announcements-grid.list-view .card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 12px; 
}

.announcements-grid.list-view .card-price {
    font-size: 1.5rem;
    margin-bottom: 0;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 40px;
    padding: 20px 0;
    flex-wrap: wrap;
}

.pagination-btn {
    background: white;
    border: 2px solid #e0e0e0;
    color: #2c3e50;
    padding: 10px 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 600;
    font-size: 15px;
    min-width: 44px;
    text-align: center;
}

.pagination-btn:hover:not(:disabled) {
    background: #e8f4f8;
    color: #2980b9;
    border-color: #3498db;
}

.pagination-btn.active {
    background: #3498db;
    color: white;
    border-color: #3498db;
}

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

.pagination-dots {
    padding: 0 10px;
    color: #7f8c8d;
}

@media (max-width: 768px) {
    /* Одна колонка */
    .announcements-grid,
    .announcements-grid.list-view {
        display: grid;
        grid-template-columns: 1fr;
        gap: 16px;
    }

    /* Ховаємо весь перемикач виду */
    .view-toggle {
        display: none;
    }

    /* list-view поводиться як grid-view */
    .announcements-grid.list-view .announcement-card {
        flex-direction: column !important;
        min-height: unset !important;
        height: auto !important;
    }

    .announcements-grid.list-view .card-image {
        width: 100% !important;
        min-width: unset !important;
        height: clamp(160px, 28.6vw, 220px) !important;
        margin-right: 0 !important;
        border-radius: 12px 12px 0 0 !important;
    }

    .announcements-grid.list-view .card-content {
        padding: 15px !important;
        width: 100% !important;
    }


}

@media (max-width: 480px) {
    .announcements-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .view-toggle {
        margin-right: 4px;
        border-width: 1.5px;
    }
    
    .view-btn {
        width: 36px;
        height: 36px;
    }
    
    .view-btn .svg-icon {
        width: 16px;
        height: 16px;
    }
}

.post-block {
    background: white;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.post-block h2 {
    font-size: 24px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 15px;
}

.post-block p {
    font-size: 15px;
    line-height: 1.8;
    color: #555;
}


        .modal {
            position: fixed;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            background: white;
            border-radius: 8px;
            box-shadow: 0 5px 30px rgba(0,0,0,0.3);
            z-index: 1001;
            max-width: 600px;
            width: 95%;
            max-height: 90vh;
            overflow-y: auto;
        }
        
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    display: none;
    backdrop-filter: blur(5px); 
    -webkit-backdrop-filter: blur(5px); 
}

.modal-overlay.active {
    display: block;
}
        

        
        .modal-close {
            background: none;
            border: none;
            font-size: 2rem;
            cursor: pointer;
            color: #FFF;
            line-height: 1;
            padding: 0;
            width: 30px;
            height: 30px;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        
        .modal-close:hover {
            color: #333;
        }
        
        .modal-body {
            max-height: calc(90vh - 100px);
            overflow-y: auto;
        }
        
        .success-message {
 color: #25CC73;
        background-color: #E8F5E9;
        border-left: 5px solid #25CC73;
        padding: 15px;
        margin: 15px 0;
        border-radius: 4px;
        font-size: 15px;
        font-weight: 500;
        font-family: Arial, sans-serif;
        line-height: 1.5;
        }
        
        .error-message {
color: #CC2531;
        background-color: #FFEBEE;
        border-left: 5px solid #CC2531;
        padding: 15px;
        margin: 15px 0;
        border-radius: 4px;
        font-size: 15px;
        font-weight: 500;
        font-family: Arial, sans-serif;
        line-height: 1.5;
        }
        

.modal-header {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    color: white;
    padding: 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 8px 8px 0 0;
    flex-shrink: 0;
}

.modal-contact .modal-header {
    background: linear-gradient(135deg, #3498db, #2c3e50);
}

.modal-gallery .modal-header {
    background: linear-gradient(135deg, #3498db, #2c3e50);
}

.modal-title {
    font-size: 24px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-title .svg-icon {
    width: 24px;
    height: 24px;
}

.close-modal {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.close-modal:hover {
    background: rgba(255, 255, 255, 0.35);
}

.close-modal:active {
    background: rgba(255, 255, 255, 0.15);
}

.modal .form-group label[style*="display: flex"] {
    justify-content: flex-start !important;
    text-align: left !important;
}

.modal-body {
    padding: 30px;
    overflow-y: auto;
    flex: 1;
}

.contact-methods {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.contact-method {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    transition: all 0.3s;
    text-decoration: none;
    color: inherit;
}

.contact-method:hover {
    background: #e9ecef;
    transform: translateX(5px);
}

.contact-icon {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.contact-icon.phone { background: #4caf50; }
.contact-icon.email { background: #2196f3; }
.contact-icon.whatsapp { background: #25d366; }
.contact-icon.telegram { background: #0088cc; }

.contact-icon .svg-icon {
    width: 22px;
    height: 22px;
    color: #3498db;
}

.contact-info {
    flex: 1;
    min-width: 0;
}

.contact-label {
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 2px;
}

.contact-value {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    word-break: break-word;
}


.imgview-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.imgview-modal-overlay.imgview-active {
    display: flex;
    opacity: 1;
}

.imgview-close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    cursor: pointer;
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.imgview-close-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    transform: rotate(90deg);
}

.imgview-close-btn::before,
.imgview-close-btn::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 2px;
    background-color: #fff;
}

.imgview-close-btn::before {
    transform: rotate(45deg);
}

.imgview-close-btn::after {
    transform: rotate(-45deg);
}

.imgview-counter {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.6);
    color: #fff;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    z-index: 10001;
}

.imgview-content-wrapper {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px 100px 20px 100px;
}

.imgview-image-container {
    max-width: 100%;
    max-height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.imgview-main-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.imgview-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background-color: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    cursor: pointer;
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.imgview-nav-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
}

.imgview-nav-btn.imgview-disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}

.imgview-nav-btn.imgview-prev {
    left: 30px;
}

.imgview-nav-btn.imgview-next {
    right: 30px;
}

.imgview-nav-btn::before {
    content: '';
    width: 12px;
    height: 12px;
    border-top: 3px solid #fff;
    border-right: 3px solid #fff;
}

.imgview-nav-btn.imgview-prev::before {
    transform: rotate(-135deg);
    margin-left: 4px;
}

.imgview-nav-btn.imgview-next::before {
    transform: rotate(45deg);
    margin-right: 4px;
}

.imgview-thumbnail-strip {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    max-width: 80%;
    background-color: rgba(0, 0, 0, 0.6);
    padding: 10px;
    border-radius: 10px;
    display: flex;
    gap: 10px;
    overflow-x: auto;
    z-index: 10001;
}

.imgview-thumbnail-strip::-webkit-scrollbar {
    height: 6px;
}

.imgview-thumbnail-strip::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.imgview-thumbnail-strip::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

.imgview-thumbnail-strip::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

.imgview-thumbnail {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
    opacity: 0.6;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    flex-shrink: 0;
}

.imgview-thumbnail:hover {
    opacity: 0.9;
}

.imgview-thumbnail.imgview-active-thumb {
    opacity: 1;
    border-color: #fff;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}


@media (max-width: 768px) {
    .imgview-content-wrapper {
        padding: 60px 60px 100px 60px;
    }

    .imgview-nav-btn {
        width: 40px;
        height: 40px;
    }

    .imgview-nav-btn.imgview-prev {
        left: 10px;
    }

    .imgview-nav-btn.imgview-next {
        right: 10px;
    }

    .imgview-thumbnail-strip {
        max-width: 90%;
    }

    .imgview-thumbnail {
        width: 60px;
        height: 45px;
    }

    .imgview-close-btn {
        width: 35px;
        height: 35px;
        top: 15px;
        right: 15px;
    }

    .imgview-counter {
        top: 15px;
        font-size: 12px;
        padding: 6px 12px;
    }
}

@media (max-width: 480px) {
    .imgview-content-wrapper {
        padding: 60px 20px 100px 20px;
    }

    .imgview-nav-btn {
        width: 35px;
        height: 35px;
    }

    .imgview-nav-btn.imgview-prev {
        left: 5px;
    }

    .imgview-nav-btn.imgview-next {
        right: 5px;
    }

    .imgview-thumbnail {
        width: 50px;
        height: 38px;
    }
}


.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
    font-size: 15px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s;
    font-family: inherit;
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #2ecc71;
    box-shadow: 0 0 0 3px rgba(46, 204, 113, 0.1);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.char-counter {
    font-size: 12px;
    color: #999;
    margin-top: 5px;
    display: block;
}

.image-upload-area {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.image-upload {
    border: 2px dashed #e0e0e0;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.image-upload:hover {
    border-color: #2ecc71;
    background: #f8fffe;
}

.image-upload .svg-icon {
    font-size: 48px;
    color: #2ecc71;
    margin-bottom: 10px;
}

.image-upload p {
    color: #7f8c8d;
    font-size: 14px;
}

.image-upload input[type="file"] {
    display: none;
}

.image-preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
}

.preview-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    background: #f0f0f0;
}

.preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.preview-item.main-photo::after {
    content: "Main";
    position: absolute;
    top: 5px;
    left: 5px;
    background: #2ecc71;
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
}

.remove-photo {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.remove-photo:hover {
    background: rgba(0, 0, 0, 0.8);
}

.modal-footer {
    padding: 20px 30px;
    border-top: 2px solid #f0f0f0;
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    flex-shrink: 0;
}

.btn-cancel,
.btn-submit {
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 15px;
    white-space: nowrap;
}

.btn-cancel {
    background: #ecf0f1;
    color: #2c3e50;
}

.btn-cancel:hover {
    background: #d5dbdb;
}

.btn-submit {
    background: #2ecc71;
    color: white;
}

.btn-submit:hover {
    background: #27ae60;
}

.footer {
    background: linear-gradient(135deg, #2c3e50, #4a6491);
    color: white;
    padding: 70px 20px 40px;
    margin-top: 80px;
    position: relative;
}

.footer::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #3498db, #6dd5fa);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto 40px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 40px;
}

.footer-section h3 {
    font-size: 18px;
    margin-bottom: 20px;
    color: #6dd5fa;
}

.footer-section p,
.footer-section li {
    font-size: 14px;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.85);
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-section ul li {
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-section ul li .svg-icon {
    color: #6dd5fa;
    min-width: 16px;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.footer-section ul li a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section ul li a:hover {
    color: #fff;
}

.social-links {
    display: flex;
    gap: 14px;
    margin-top: 20px;
}

.social-links a {
    width: 42px;
    height: 42px;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: #3498db;
    transform: translateY(-4px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.25);
}

.social-links a .svg-icon {
    width: 18px;
    height: 18px;
}

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 25px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    text-align: center;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.65);
}


@media (max-width: 992px) {

    
    .search-bar {
        margin: 0 10px;
        max-width: 100%;
    }
    
    .page-title {
        font-size: 19px;
        margin: 0 10px;
    }
    
    .announcements-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
    
    .announcements-grid.list-view .card-image {
        width: 240px;
        min-width: 240px;
    }
}

@media (max-width: 1180px) {
    .logo span {
        display: none;
    }
	
	.search-bar {
        margin: 0 10px;
        max-width: 100%;
    }
	
	.header-btn {
        padding: 8px 10px;
        min-width: 40px;
    }
    
    .header-btn span {
        display: none;
    }
}	
	

@media (max-width: 768px) {
    body {
        padding-top: 65px;
    }

    .header {
      
        height: 65px;
        gap: 20px;
    }
    
    .logo span {
        display: none;
    }
    
    .search-bar {
        margin: 0 8px;
        max-width: 100%;
    }
    
    .search-bar input {
        padding: 10px 12px;
        font-size: 14px;
    }
    
    .search-btn {
        padding: 0 12px;
        min-width: 40px;
    }
    
    .header-actions {
        gap: 6px;
    }
    
    .header-btn {
        padding: 8px 10px;
        min-width: 40px;
    }
    
    .header-btn span {
        display: none;
    }
    
    .add-btn {
        padding: 8px 10px;
        min-width: 40px;
    }
    
    .add-btn span {
        display: none;
    }

    .container {
        margin: 20px auto;
        padding: 0 15px;
    }

    .page-header {
        flex-wrap: nowrap;
        gap: 10px;
    }

    .header-left {
        gap: 10px;
    }

    .view-toggle {
        flex-shrink: 0;
    }

    .view-btn {
        width: 40px;
        height: 36px;
        font-size: 16px;
    }

    .page-title {
        font-size: 18px;
        margin: 0 8px;
    }

	.add-ads {
        height: 40px;
        padding: 0 12px;
        font-size: 14px;
    }
    
    .add-ads span {
        font-size: 14px;
    }	
	
	
	 .filter-actions {
        flex-direction: row;
    }
    
    .close-filter-btn,
    .apply-filter-btn,
    .reset-filter-btn {
        flex: 1;
        min-width: 120px;
    }
	
	
    .dropdown {
        right: 10px;
        width: 280px;
        max-width: calc(100vw - 20px);
    }

    .announcements-grid {
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
        gap: 15px;
    }
    
    .announcements-grid.list-view .announcement-card {
        min-height: auto !important;
        height: auto !important;
        flex-direction: column !important;
    }
    
    .announcements-grid.list-view .card-image {
        width: 100% !important;
        min-width: 100% !important;
        min-height: 240px !important;
        height: 240px !important;
        border-radius: 12px 12px 0 0 !important;
        font-size: 36px;
    }
    
    .announcements-grid.list-view .card-content {
        padding: 15px;
        width: 100%;
    }
    
    .card-footer {
        gap: 8px;
    }
    
    .card-price {
        font-size: 18px;
    }
    
    .contact-btn {
        padding: 8px 30px;
        font-size: 16px;
    }

    .filter-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .filter-actions {
        flex-direction: column;
    }

    .apply-filter-btn,
    .reset-filter-btn {
        width: 100%;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .modal {
        width: 95%;
        max-height: 95vh;
    }

    .modal-header {
        padding: 20px;
    }

    .modal-title {
        font-size: 20px;
    }

    .modal-body {
        padding: 20px;
    }

    .modal-footer {
        padding: 15px 20px;
        flex-direction: column;
    }

    .btn-cancel,
    .btn-submit {
        width: 100%;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .pagination {
        gap: 8px;
    }
    
    .pagination-btn {
        padding: 8px 12px;
        min-width: 40px;
        font-size: 14px;
    }
    
    .show-more-btn {
        font-size: 12px;
    }
	
	.count-text {
		display: none;
	}	
}

@media (max-width: 564px) {
    .view-toggle {
        display: none !important;
        visibility: hidden !important;
        pointer-events: none !important;
        opacity: 0 !important;
        width: 0 !important;
        height: 0 !important;
        overflow: hidden !important;
        position: absolute !important;
    }
    
    .announcements-grid,
    .announcements-grid:not(.list-view),
    .announcements-grid.list-view {
        display: flex !important;
        flex-direction: column !important;
    }
    

}

@media (max-width: 480px) {
    body {
        padding-top: 60px;
    }
    
    .header {
        height: 60px;
        gap: 20px;
    }
    
    .search-bar {
        margin: 0 5px;
        max-width: 100%;
    }
    
    .search-bar input {
        padding: 8px 10px;
        font-size: 13px;
    }
    
    .search-btn {
        padding: 0 10px;
        min-width: 36px;
    }
    
    .page-title {
        font-size: 16px;
        margin: 0 5px;
    }
    
    .view-btn {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }
    
	 .filter-actions {
        flex-direction: column;
    }
    
	.add-ads {
        height: 40px;
        padding: 0 8px;
        font-size: 13px;
    }
    
    .add-ads span {
        font-size: 13px;
    }
    
	 .filter-actions {
        flex-direction: column;
    }
	
    .close-filter-btn,
    .apply-filter-btn,
    .reset-filter-btn {
        width: 100%;
    }
	
	
    .announcements-grid {
        grid-template-columns: 1fr !important;
        gap: 12px;
    }
    
    .announcements-grid.list-view .card-image {
        min-height: 120px !important;
        height: 120px !important;
        font-size: 32px;
    }
    
    .card-title {
        font-size: 16px;
    }
    
    .card-description {
        font-size: 13px;
        -webkit-line-clamp: 2;
    }
    
    .card-price {
        font-size: 18px;
    }
    
    .contact-btn {
        padding: 8px 30px;
        font-size: 16px;
    }
    
    .badge {
        font-size: 10px;
        padding: 3px 8px;
    }
    
    .show-more-btn {
        font-size: 11px;
    }
}

@media (max-width: 360px) {
    .header {
        padding: 0 5px;
    }
    
    .search-bar {
        margin: 0 3px;
        max-width: 100%;
    }
    
    .search-bar input {
        padding: 6px 8px;
        font-size: 12px;
    }
    
    .page-title {
        font-size: 14px;
        margin: 0 3px;
    }
    
    .announcements-grid.list-view .card-image {
        min-height: 140px !important;
        height: 140px !important;
        font-size: 28px;
    }
    
    .card-title {
        font-size: 15px;
    }
    
    .card-price {
        font-size: 16px;
    }
    
    .contact-btn {
        padding: 8px 20px;
        font-size: 14px;
    }
    
    .card-description {
        -webkit-line-clamp: 1;
    }
}

.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.form-row .form-group {
    flex: 1;
}

.form-group {
    margin-bottom: 20px;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s;
    background-color: white;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.1);
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
    font-family: inherit;
}

.char-counter {
    display: block;
    text-align: right;
    font-size: 12px;
    color: #666;
    margin-top: 5px;
}

.image-upload-area {
    border: 2px dashed #ddd;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    background: #f9f9f9;
    transition: border-color 0.3s;
}

.image-upload-area:hover {
    border-color: #007bff;
}

.image-upload {
    cursor: pointer;
    padding: 10px;
}

.image-upload .svg-icon {
    width: 48px;
    height: 48px;
    fill: #666;
    margin-bottom: 15px;
}

.image-upload p {
    color: #666;
    margin: 0;
    font-size: 14px;
}

.image-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 20px;
}

.preview-item {
    position: relative;
    width: 120px;
    height: 120px;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.remove-image {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(255, 0, 0, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s;
}

.remove-image:hover {
    background: rgba(200, 0, 0, 0.9);
}

.form-footer {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.btn-cancel,
.btn-submit {
    padding: 12px 30px;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
}

.btn-cancel {
    background: #f5f5f5;
    color: #666;
    border: 1px solid #ddd;
}

.btn-cancel:hover {
    background: #e0e0e0;
}

.btn-submit {
    background: #007bff;
    color: white;
}

.btn-submit:hover {
    background: #0056b3;
}

.required-field::after {
    content: " *";
    color: #ff4444;
}

select[disabled] {
    opacity: 0.7;
    cursor: wait;
}

.loading-indicator {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    color: #666;
}


.card-image {
    position: relative;
    width: 100%;
    height: 200px; 
    overflow: hidden;
    border-radius: 8px 8px 0 0;
    cursor: pointer;
}

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

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

.image-count {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
}


@media (max-width: 768px) {
    .card-image {
        height: 180px; 
    }
    
    .gallery-image-container {
        height: 300px;
    }
}

@media (max-width: 480px) {

    
    .gallery-image-container {
        height: 250px;
    }
}

.card-image img.loading {
    opacity: 0;
}

.card-image img.loaded {
    opacity: 1;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

        .image-upload-area {
            position: relative;
        }

        .image-upload {
            border: 2px dashed #ccc;
            border-radius: 8px;
            padding: 40px 20px;
            text-align: center;
            cursor: pointer;
            transition: all 0.3s ease;
            background: #f9f9f9;
            position: relative;
        }

        .image-upload:hover {
            border-color: #4CAF50;
            background: #f0f9f0;
        }

        .image-upload.dragover {
            border-color: #2196F3;
            background: #e3f2fd;
        }

        .image-upload .svg-icon {
            width: 48px;
            height: 48px;
            margin-bottom: 16px;
            fill: #666;
        }

        .image-upload p {
            margin: 0;
            color: #666;
            font-size: 16px;
        }

        .image-preview {
            display: flex;
            flex-wrap: wrap;
            gap: 10px;
            margin-top: 15px;
            min-height: 60px;
        }

        .preview-item {
            position: relative;
            width: 120px;
            height: 120px;
            border: 1px solid #ddd;
            border-radius: 6px;
            overflow: hidden;
            box-shadow: 0 2px 4px rgba(0,0,0,0.1);
            animation: fadeIn 0.3s ease;
        }

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

        .preview-item img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }

        .preview-item .remove-image {
            position: absolute;
            top: 5px;
            right: 5px;
            width: 24px;
            height: 24px;
            background: rgba(255,0,0,0.8);
            color: white;
            border: none;
            border-radius: 50%;
            cursor: pointer;
            font-size: 16px;
            line-height: 1;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 0;
            transition: all 0.3s;
            z-index: 10;
        }

        .preview-item .remove-image:hover {
            background: rgba(255,0,0,1);
            transform: scale(1.1);
        }

        .preview-item .file-info {
            position: absolute;
            bottom: 0;
            left: 0;
            right: 0;
            background: rgba(0,0,0,0.7);
            color: white;
            font-size: 11px;
            padding: 3px 5px;
            text-align: center;
            z-index: 5;
        }

        .preview-count {
            margin-top: 10px;
            color: #666;
            font-size: 14px;
        }

        .form-group {
            margin-bottom: 20px;
        }

        .form-row {
            display: flex;
            gap: 20px;
            margin-bottom: 20px;
        }

        .form-row .form-group {
            flex: 1;
            margin-bottom: 0;
        }

        label {
            display: block;
            margin-bottom: 5px;
            font-weight: 500;
            color: #333;
        }

        input[type="text"],
        input[type="number"],
        input[type="tel"],
        input[type="email"],
        textarea,
        select {
            width: 100%;
            padding: 10px 12px;
            border: 1px solid #ddd;
            font-size: 14px;
            transition: border-color 0.3s;
        }

        input[type="text"]:focus,
        input[type="number"]:focus,
        input[type="tel"]:focus,
        input[type="email"]:focus,
        textarea:focus,
        select:focus {
            border-color: #4CAF50;
            outline: none;
        }

.header .search-bar input:focus {
    outline: none !important;
    border-color: transparent !important;
    box-shadow: none !important;
    background: white !important; 
}

.header input#headerSearchInput:focus,
.header .search-bar input[type="text"]:focus {
    outline: none !important;
    border-color: transparent !important;
    box-shadow: none !important;
    background: rgba(255, 255, 255, 0.95);
}		
		
input, select, textarea {
    font-size: 16px !important; 
}

@supports (-webkit-touch-callout: none) {
    input, select, textarea {
        font-size: 16px !important;
    }
}

@media screen and (max-width: 768px) {
    input, select, textarea {
        font-size: max(16px, 1em);
    }
}
	
        select:disabled {
            background-color: #f5f5f5;
            color: #999;
            cursor: not-allowed;
            opacity: 0.7;
        }

        textarea {
            min-height: 120px;
            resize: vertical;
        }

        .char-counter {
            display: block;
            text-align: right;
            margin-top: 5px;
            font-size: 12px;
            color: #666;
        }

        .form-help-text {
            margin-top: 5px;
            font-size: 12px;
            color: #666;
        }

        .form-footer {
            display: flex;
            justify-content: flex-end;
            gap: 10px;
            margin-top: 30px;
            padding-top: 20px;
            border-top: 1px solid #eee;
        }

        .btn-cancel,
        .btn-submit {
            padding: 10px 24px;
            border-radius: 4px;
            font-size: 14px;
            cursor: pointer;
            transition: all 0.3s;
        }

        .btn-cancel {
            background: #f5f5f5;
            border: 1px solid #ddd;
            color: #333;
        }

        .btn-cancel:hover {
            background: #e9e9e9;
        }

        .btn-submit {
            background: #4CAF50;
            border: 1px solid #45a049;
            color: white;
        }

        .btn-submit:hover {
            background: #45a049;
        }

        .post-block {
            background: white;
            border-radius: 8px;
            padding: 30px;
            box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        }

        .alert {
            padding: 15px;
            margin-bottom: 20px;
            border-radius: 4px;
        }

        .alert-success {
            background-color: #dff0d8;
            border: 1px solid #d6e9c6;
            color: #3c763d;
        }

        .alert-error {
            background-color: #f2dede;
            border: 1px solid #ebccd1;
            color: #a94442;
        }
		
.toggle-subcategories,
.toggle-subregions {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 8px;
}

.category-arrow,
.region-arrow {
    width: 16px;
    height: 16px;
    transition: transform 0.3s ease;
    fill: currentColor;
}

.category-arrow.rotated,
.region-arrow.rotated {
    transform: rotate(180deg);
}

.category-header-inner,
.region-header-inner {
    display: flex;
    align-items: center;
}

.category-header,
.region-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.subcategories,
.subregions {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.subcategories.active,
.subregions.active {
    max-height: 5000px;
}	

.search-highlight {
    background-color: #ffeb3b;
    padding: 0 2px;
    border-radius: 2px;
    font-weight: bold;
}

.search-query {
    color: #4a6baf;
    font-style: italic;
}

.search-results-count {
    color: #666;
    font-size: 0.9rem;
}

.admin-actions {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10;
    display: flex;
    gap: 10px;
}

.admin-btn {
    width: 37px;
    height: 37px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(255, 255, 255, 0.9);
    border: 1px solid #ddd;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.admin-btn:hover {
    background-color: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.admin-btn.edit-btn:hover {
    background-color: #e8f4ff;
    border-color: #2196F3;
}

.admin-btn.delete-btn:hover {
    background-color: #ffebee;
    border-color: #f44336;
}

.admin-btn .svg-icon {
    width: 18px;
    height: 18px;
    fill: #666;
}

.admin-btn.edit-btn .svg-icon {
    fill: #2196F3;
}

.admin-btn.delete-btn .svg-icon {
    fill: #f44336;
}	

.btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

.breadcrumbs {
    font-size: 18px;
    color: #666;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.breadcrumbs a {
    color: #007bff;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
}

.breadcrumbs a:hover {
    text-decoration: underline;
}

.breadcrumbs svg {
    width: 20px;
    height: 20px;
    display: block;
}

.breadcrumbs .current {
    color: #333;
    font-weight: 500;
}
.breadcrumbs .separator {
    margin: 0 4px;
    color: #999;
}

.status-checkbox {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    color: #1a2639;
}

.checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin: 0;
    cursor: pointer;
}

.status-checkbox p {
    margin: 0;
    color: #6c757d;
    font-size: 12px;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 12px;
    border: 1px solid #eef2f6;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    margin: 20px 0;
    min-height: 300px;
}

.empty-state svg {
    width: 80px;
    height: 80px;
    color: #cbd5e0;
    margin-bottom: 24px;
    opacity: 0.8;
}

.empty-state h3 {
    font-size: 22px;
    font-weight: 600;
    color: #2c3e50;
    margin: 0 0 12px 0;
    line-height: 1.3;
}

.empty-state p {
    font-size: 16px;
    color: #6c757d;
    margin: 0 0 24px 0;
    max-width: 400px;
}

.empty-state .empty-state-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s;
}

.empty-state .empty-state-action:hover {
    background: #2980b9;
}

.empty-state .empty-state-action svg {
    width: 18px;
    height: 18px;
    margin-right: 8px;
    color: white;
    margin-bottom: 0;
}

.empty-state.success svg {
    color: #2ecc71;
}

.empty-state.warning svg {
    color: #f39c12;
}

.empty-state.error svg {
    color: #e74c3c;
}

.empty-state.compact {
    padding: 40px 20px;
    min-height: 200px;
}

.empty-state.compact svg {
    width: 60px;
    height: 60px;
    margin-bottom: 16px;
}

.empty-state.compact h3 {
    font-size: 20px;
    margin-bottom: 8px;
}

.empty-state.compact p {
    font-size: 14px;
    margin-bottom: 20px;
}

/* Адаптивні стилі для page-header */
@media (max-width: 768px) {
    .page-header {
        padding: 12px;
        gap: 10px;
    }
    
    .controls-row {
        gap: 10px;
    }
    
    .header-controls {
        gap: 8px; 
    }
   
    .breadcrumbs .separator {
        margin: 0 2px;
    }
    
    .search-results-count {
        font-size: 0.85rem;
    }
    
    .filter-btn {
        padding: 0 12px;
        height: 36px;
        font-size: 14px;
    }
    
    .filter-btn .svg-icon {
        width: 14px;
        height: 14px;
    }
    
    .view-btn {
        width: 32px;
        height: 32px;
    }
    
    .view-btn .svg-icon {
        width: 18px;
        height: 18px;
    }
}