* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
    overflow-x: hidden;
}

html {
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.5rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: nowrap;
    min-height: 3rem;
    gap: 1rem;
}

.logo {
    font-size: 1.8rem;
    font-weight: bold;
    margin: 0;
    white-space: nowrap;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo img {
    height: 3rem;
    width: auto;
    object-fit: contain;
}

nav {
    display: flex;
    gap: 1.5rem;
    flex-wrap: nowrap;
    align-items: center;
    min-height: 2.5rem;
    position: relative;
    flex-shrink: 0;
}

.mobile-menu-btn {
    display: none;
    width: 42px;
    height: 36px;
    padding: 0;
    border: none;
    background: rgba(255,255,255,0.15);
    border-radius: 8px;
    cursor: pointer;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: background-color 0.2s;
}

.mobile-menu-btn span {
    display: block;
    width: 22px;
    height: 2.5px;
    background: white;
    border-radius: 2px;
    transition: transform 0.2s, opacity 0.2s;
}

header.nav-open .mobile-menu-btn span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

header.nav-open .mobile-menu-btn span:nth-child(2) {
    opacity: 0;
}

header.nav-open .mobile-menu-btn span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

header.nav-open .mobile-menu-btn {
    background: rgba(255,255,255,0.25);
}

.nav-link {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: background-color 0.3s, opacity 0.2s;
    display: inline-block;
    white-space: nowrap;
    flex-shrink: 0;
    opacity: 1;
    visibility: visible;
    position: relative;
    min-width: 0;
}

/* Скрытие ссылок навигации */
.nav-link.nav-hidden {
    display: none !important;
}

.nav-link.nav-visible {
    display: inline-block !important;
}

.nav-link:hover,
.nav-link.active {
    background-color: rgba(255,255,255,0.2);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.hero h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.2rem;
    opacity: 0.95;
}

/* Banners Section */
.banners {
    padding: 4rem 0;
}

.banner-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.banner-card {
    background: white;
    border-radius: 15px;
    padding: 2.5rem 2rem;
    text-decoration: none;
    color: #333;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.banner-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    transform: scaleX(0);
    transition: transform 0.3s;
}

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

.banner-card:hover::before {
    transform: scaleX(1);
}

.banner-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.banner-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #667eea;
}

.banner-card p {
    color: #666;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.banner-arrow {
    font-size: 2rem;
    color: #667eea;
    transition: transform 0.3s;
}

.banner-card:hover .banner-arrow {
    transform: translateX(10px);
}

/* Info Section */
.info {
    background: white;
    padding: 3rem 0;
    margin-top: 2rem;
}

.info h2 {
    text-align: center;
    color: #667eea;
    margin-bottom: 1.5rem;
    font-size: 2rem;
}

.info p {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    color: #666;
    font-size: 1.1rem;
}

/* Page Header (for other pages) */
.page-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 3rem 0;
    text-align: center;
}

.page-header h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.page-header p {
    font-size: 1.2rem;
    opacity: 0.95;
}

/* Counter Section */
.counter-section {
    margin-top: 2rem;
}

.counter-box {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    padding: 1.5rem 3rem;
    border-radius: 15px;
    backdrop-filter: blur(10px);
}

.counter-number {
    display: block;
    font-size: 3rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.counter-label {
    display: block;
    font-size: 1rem;
    opacity: 0.9;
}

/* Content Section */
.content {
    padding: 3rem 0;
    min-height: 400px;
}

.content p {
    font-size: 1.1rem;
    color: #666;
    line-height: 1.8;
}

/* Filters Section */
.filters-section {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.filters-section h3 {
    color: #667eea;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    align-items: end;
}

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

.filter-group label {
    margin-bottom: 0.5rem;
    color: #333;
    font-weight: 500;
    font-size: 0.9rem;
}

.filter-select {
    padding: 0.75rem 2.5rem 0.75rem 0.75rem !important;
    border: 2px solid #e0e0e0 !important;
    border-radius: 8px !important;
    font-size: 1rem !important;
    background-color: white !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23667eea' d='M6 9L1 4h10z'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 0.75rem center !important;
    background-size: 12px !important;
    color: #333 !important;
    cursor: pointer !important;
    transition: all 0.3s !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    text-indent: 0.01px !important;
    text-overflow: '' !important;
}

.filter-select:hover {
    border-color: #667eea !important;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.1) !important;
}

.filter-select:focus {
    outline: none !important;
    border-color: #667eea !important;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1), 0 2px 8px rgba(102, 126, 234, 0.15) !important;
}

.filter-select option {
    padding: 0.75rem !important;
    background: white !important;
    color: #333 !important;
    font-size: 1rem !important;
    line-height: 1.5 !important;
}

.filter-select option:checked,
.filter-select option[selected] {
    background: #f0f4ff !important;
    color: #667eea !important;
    font-weight: 500 !important;
}

.filter-select option:hover {
    background: #f0f4ff !important;
    color: #667eea !important;
}

.reset-btn {
    padding: 0.75rem 1.5rem;
    background: #f5f5f5;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    color: #666;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
}

.reset-btn:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

/* Catalog Section */
.catalog-section {
    margin-top: 2rem;
}

.catalog-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.catalog-header h3 {
    color: #667eea;
    font-size: 1.8rem;
}

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

.results-count span {
    font-weight: bold;
    color: #667eea;
}

.pets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.pet-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: block;
    position: relative;
    isolation: isolate;
}

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

/* Убеждаемся, что custom-select dropdown всегда поверх карточки */
.pet-card .custom-select-dropdown.open {
    z-index: 99999 !important;
    position: fixed !important;
}

/* Dropdown в body должен быть всегда виден */
body > .custom-select-dropdown.open {
    z-index: 99999 !important;
    position: fixed !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
}

.pet-image {
    width: 100%;
    height: 250px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5rem;
    color: white;
    transition: opacity 0.3s ease-in-out;
}

/* Стили для ленивой загрузки изображений */
.pet-image.lazy-image {
    background-image: none !important;
    position: relative;
}

.pet-image.lazy-image::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

.pet-info {
    padding: 1.5rem;
}

.pet-details-simple {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: center;
    justify-content: center;
    min-height: 60px;
}

.pet-card-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid #f0f0f0;
}

.btn-edit-pet,
.btn-delete-pet {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 5px;
    transition: background-color 0.2s;
}

.btn-edit-pet:hover {
    background-color: #e3f2fd;
}

.btn-delete-pet:hover {
    background-color: #ffebee;
}

.pet-name {
    font-size: 1.5rem;
    color: #333;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.pet-details {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.pet-detail {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #666;
    font-size: 0.9rem;
}

.pet-detail-icon {
    font-size: 1.2rem;
}

.pet-description {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    display: -webkit-box;
    line-clamp: 3;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.pet-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    margin-right: 0.5rem;
}

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

.badge-type-cat {
    background: #fce4ec;
    color: #c2185b;
}

.badge-age-young {
    background: #fff3e0;
    color: #f57c00;
}

.badge-age-adult {
    background: #e8f5e9;
    color: #388e3c;
}

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

.no-results {
    text-align: center;
    padding: 3rem;
    background: white;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.no-results p {
    color: #666;
    font-size: 1.1rem;
}

/* Emergency Forms Section */
.forms-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.form-section {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.form-section.collapsed .emergency-form {
    display: none;
}

.form-section.collapsed .form-toggle-icon {
    transform: rotate(-90deg);
}

.form-header {
    text-align: center;
    margin-bottom: 2rem;
    padding: 1.5rem;
    border-bottom: 2px solid #f0f0f0;
    cursor: pointer;
    user-select: none;
    transition: all 0.2s ease;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.form-section.collapsed .form-header {
    margin-bottom: 0;
    border-bottom: none;
}

.form-header:hover {
    background-color: #f8f9fa;
    border-radius: 10px;
}

.form-header-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.form-header-text {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.form-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.form-toggle-icon {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
    color: #667eea;
    transition: transform 0.3s ease;
}

.form-header h3 {
    color: #667eea;
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.form-header p {
    color: #666;
    font-size: 1rem;
}

.emergency-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    animation: slideDown 0.3s ease;
}

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

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    margin-bottom: 0.5rem;
    color: #333;
    font-weight: 500;
    font-size: 0.95rem;
}

.form-group input,
.form-group textarea {
    padding: 0.75rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    color: #333;
    transition: border-color 0.3s;
}

.form-group select {
    padding: 0.75rem 2.5rem 0.75rem 0.75rem !important;
    border: 2px solid #e0e0e0 !important;
    border-radius: 8px !important;
    font-size: 1rem !important;
    font-family: inherit !important;
    color: #333 !important;
    background-color: white !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23667eea' d='M6 9L1 4h10z'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 0.75rem center !important;
    background-size: 12px !important;
    cursor: pointer !important;
    transition: all 0.3s !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    text-indent: 0.01px !important;
    text-overflow: '' !important;
}

.form-group select:hover {
    border-color: #667eea !important;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.1) !important;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group select:focus {
    outline: none !important;
    border-color: #667eea !important;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1), 0 2px 8px rgba(102, 126, 234, 0.15) !important;
}

.form-group select option {
    padding: 0.75rem !important;
    background: white !important;
    color: #333 !important;
    font-size: 1rem !important;
    line-height: 1.5 !important;
}

.form-group select option:checked,
.form-group select option[selected] {
    background: #f0f4ff !important;
    color: #667eea !important;
    font-weight: 500 !important;
}

.form-group select option:hover {
    background: #f0f4ff !important;
    color: #667eea !important;
}

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

/* Стили для календаря (date input) */
input[type="date"],
input[type="date"].form-control,
input[type="date"][class],
input[type="date"][id] {
    padding: 0.75rem 2.5rem 0.75rem 0.75rem !important;
    border: 2px solid #e0e0e0 !important;
    border-radius: 8px !important;
    font-size: 1rem !important;
    font-family: inherit !important;
    color: #333 !important;
    background-color: white !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    position: relative !important;
    min-width: 200px !important;
}

input[type="date"]:hover,
input[type="date"].form-control:hover,
input[type="date"][class]:hover,
input[type="date"][id]:hover {
    border-color: #667eea !important;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.1) !important;
}

input[type="date"]:focus,
input[type="date"].form-control:focus,
input[type="date"][class]:focus,
input[type="date"][id]:focus {
    outline: none !important;
    border-color: #667eea !important;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1), 0 2px 8px rgba(102, 126, 234, 0.15) !important;
}

input[type="date"]:disabled,
input[type="date"].form-control:disabled,
input[type="date"][class]:disabled,
input[type="date"][id]:disabled {
    background-color: #f5f5f5 !important;
    color: #999 !important;
    cursor: not-allowed !important;
    border-color: #e0e0e0 !important;
}

/* Стили для календаря в Chrome/Edge */
input[type="date"]::-webkit-calendar-picker-indicator {
    cursor: pointer !important;
    opacity: 1 !important;
    position: absolute !important;
    right: 0.75rem !important;
    width: 20px !important;
    height: 20px !important;
    z-index: 2 !important;
    background: transparent !important;
    filter: brightness(0) saturate(100%) invert(48%) sepia(79%) saturate(2476%) hue-rotate(222deg) brightness(98%) contrast(92%) !important;
    transition: filter 0.3s ease !important;
}

input[type="date"]:hover::-webkit-calendar-picker-indicator {
    filter: brightness(0) saturate(100%) invert(60%) sepia(95%) saturate(400%) hue-rotate(90deg) brightness(95%) contrast(90%) !important;
}

input[type="date"]:focus::-webkit-calendar-picker-indicator {
    filter: brightness(0) saturate(100%) invert(60%) sepia(95%) saturate(400%) hue-rotate(90deg) brightness(95%) contrast(90%) !important;
}

/* Стили для календаря в Firefox */
input[type="date"]::-moz-calendar-picker-indicator {
    cursor: pointer !important;
    opacity: 1 !important;
    position: absolute !important;
    right: 0.75rem !important;
    width: 20px !important;
    height: 20px !important;
    z-index: 2 !important;
    background: transparent !important;
    filter: brightness(0) saturate(100%) invert(48%) sepia(79%) saturate(2476%) hue-rotate(222deg) brightness(98%) contrast(92%) !important;
    transition: filter 0.3s ease !important;
}

input[type="date"]:hover::-moz-calendar-picker-indicator {
    filter: brightness(0) saturate(100%) invert(60%) sepia(95%) saturate(400%) hue-rotate(90deg) brightness(95%) contrast(90%) !important;
}

input[type="date"]:focus::-moz-calendar-picker-indicator {
    filter: brightness(0) saturate(100%) invert(60%) sepia(95%) saturate(400%) hue-rotate(90deg) brightness(95%) contrast(90%) !important;
}

/* Универсальные стили для всех select элементов */
select,
select.form-control,
select[class],
select[id] {
    padding: 0.75rem 2.5rem 0.75rem 0.75rem !important;
    border: 2px solid #e0e0e0 !important;
    border-radius: 8px !important;
    font-size: 1rem !important;
    font-family: inherit !important;
    color: #333 !important;
    background-color: white !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23667eea' d='M6 9L1 4h10z'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 0.75rem center !important;
    background-size: 12px !important;
    cursor: pointer !important;
    transition: all 0.3s !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    text-indent: 0.01px !important;
    text-overflow: '' !important;
}

select:hover,
select.form-control:hover,
select[class]:hover,
select[id]:hover {
    border-color: #667eea !important;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.1) !important;
}

select:focus,
select.form-control:focus,
select[class]:focus,
select[id]:focus {
    outline: none !important;
    border-color: #667eea !important;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1), 0 2px 8px rgba(102, 126, 234, 0.15) !important;
}

select option,
select.form-control option,
select[class] option,
select[id] option {
    padding: 0.75rem !important;
    background: white !important;
    color: #333 !important;
    font-size: 1rem !important;
    line-height: 1.5 !important;
}

/* Стили для выбранного option (поддерживается не во всех браузерах) */
select option:checked,
select option[selected] {
    background: #f0f4ff !important;
    color: #667eea !important;
    font-weight: 500 !important;
}

/* Стили для hover на option (поддерживается не во всех браузерах) */
select option:hover {
    background: #f0f4ff !important;
    color: #667eea !important;
}

/* Базовые стили для всех основных кнопок */
.submit-btn,
.btn-primary {
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.submit-btn:hover,
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.submit-btn:active,
.btn-primary:active {
    transform: translateY(0);
}

/* Announcements Section */
.announcements-section {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    margin-top: 3rem;
}

.announcements-section h3 {
    color: #667eea;
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
}

.announcements-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid #f0f0f0;
}

/* Фильтр по дате для объявлений */
.announcements-date-filter {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 10px;
    border: 1px solid #e0e0e0;
}

.date-filter-row {
    display: flex;
    align-items: flex-end;
    gap: 1rem;
    flex-wrap: wrap;
}

.date-filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
    min-width: 150px;
}

.date-filter-group label {
    font-size: 0.9rem;
    color: #666;
    font-weight: 500;
}

.date-filter-input {
    padding: 0.6rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 0.95rem;
    background: white;
    color: #333;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.date-filter-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.reset-date-filter-btn {
    padding: 0.6rem 1.2rem;
    background: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 8px;
    color: #666;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
    height: fit-content;
}

.reset-date-filter-btn:hover {
    background: #e0e0e0;
    border-color: #ccc;
    color: #333;
}

@media (max-width: 768px) {
    .date-filter-row {
        flex-direction: column;
    }
    
    .date-filter-group {
        min-width: 100%;
    }
    
    .reset-date-filter-btn {
        width: 100%;
    }
}

.tab-btn {
    padding: 0.75rem 1.5rem;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    font-size: 1rem;
    color: #666;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
}

.tab-btn:hover {
    color: #667eea;
}

.tab-btn.active {
    color: #667eea;
    border-bottom-color: #667eea;
}

.announcements-list,
#lostAnnouncements,
#foundAnnouncements {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(280px, 350px)) !important;
    gap: 1rem !important;
    justify-content: start !important;
}

#foundAnnouncements[style*="display: none"] {
    display: none !important;
}

/* Компактные стили для карточек объявлений */
#lostAnnouncements .pet-card,
#foundAnnouncements .pet-card,
.announcements-list .pet-card {
    max-width: 320px !important;
    width: 100% !important;
}

/* Увеличенные карточки для объявлений с большими фотографиями */
#lostAnnouncements .announcement-pet-card,
#foundAnnouncements .announcement-pet-card,
.announcements-list .announcement-pet-card {
    max-width: 350px !important;
    width: 100% !important;
}

#lostAnnouncements .pet-image,
#foundAnnouncements .pet-image,
.announcements-list .pet-image {
    height: 120px !important;
    font-size: 3rem !important;
}

/* Увеличенные фотографии для объявлений */
#lostAnnouncements .announcement-pet-image,
#foundAnnouncements .announcement-pet-image,
.announcements-list .announcement-pet-image {
    height: 300px !important;
    min-height: 300px !important;
    font-size: 5rem !important;
}

#lostAnnouncements .pet-info,
#foundAnnouncements .pet-info,
.announcements-list .pet-info {
    padding: 1rem !important;
}

#lostAnnouncements .pet-name,
#foundAnnouncements .pet-name,
.announcements-list .pet-name {
    font-size: 1.1rem !important;
    margin-bottom: 0.4rem !important;
}

#lostAnnouncements .pet-details-simple,
#foundAnnouncements .pet-details-simple,
.announcements-list .pet-details-simple {
    gap: 0.3rem !important;
    margin-bottom: 0.5rem !important;
    min-height: auto !important;
}

#lostAnnouncements .pet-detail,
#foundAnnouncements .pet-detail,
.announcements-list .pet-detail {
    font-size: 0.75rem !important;
}

#lostAnnouncements .pet-detail-icon,
#foundAnnouncements .pet-detail-icon,
.announcements-list .pet-detail-icon {
    font-size: 0.85rem !important;
}

#lostAnnouncements .pet-card-actions,
#foundAnnouncements .pet-card-actions,
.announcements-list .pet-card-actions {
    margin-top: 0.4rem !important;
    padding-top: 0.4rem !important;
}

#lostAnnouncements .btn-edit-pet,
#lostAnnouncements .btn-delete-pet,
#foundAnnouncements .btn-edit-pet,
#foundAnnouncements .btn-delete-pet,
.announcements-list .btn-edit-pet,
.announcements-list .btn-delete-pet {
    font-size: 1rem !important;
    padding: 0.2rem 0.4rem !important;
}

@media (max-width: 768px) {
    #lostAnnouncements,
    #foundAnnouncements,
    .announcements-list {
        grid-template-columns: repeat(auto-fill, minmax(240px, 280px));
        gap: 0.75rem;
        justify-content: start;
    }
    
    #lostAnnouncements .pet-card,
    #foundAnnouncements .pet-card,
    .announcements-list .pet-card {
        max-width: 280px !important;
    }
    
    #lostAnnouncements .pet-image,
    #foundAnnouncements .pet-image,
    .announcements-list .pet-image {
        height: 100px !important;
        font-size: 2.5rem !important;
    }
    
    #lostAnnouncements .announcement-pet-image,
    #foundAnnouncements .announcement-pet-image,
    .announcements-list .announcement-pet-image {
        height: 250px !important;
        min-height: 250px !important;
        font-size: 4rem !important;
    }
    
    #lostAnnouncements .pet-info,
    #foundAnnouncements .pet-info,
    .announcements-list .pet-info {
        padding: 0.75rem !important;
    }
}

@media (max-width: 480px) {
    #lostAnnouncements,
    #foundAnnouncements,
    .announcements-list {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    #lostAnnouncements .announcement-pet-image,
    #foundAnnouncements .announcement-pet-image,
    .announcements-list .announcement-pet-image {
        height: 200px !important;
        min-height: 200px !important;
        font-size: 3.5rem !important;
    }
}

/* Стили для сворачиваемого контента объявлений */
.announcement-details {
    max-height: 2000px;
    overflow: hidden;
    transition: max-height 0.3s ease-out, opacity 0.3s ease-out, margin 0.3s ease-out, padding 0.3s ease-out;
    opacity: 1;
    margin-top: 0.5rem;
}

.announcement-details.collapsed {
    max-height: 0 !important;
    opacity: 0;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    overflow: hidden;
}

.announcement-header {
    user-select: none;
}

.announcement-header:hover {
    opacity: 0.8;
}

.announcement-pet-card {
    overflow: hidden;
}

.announcement-card {
    background: #f9f9f9;
    border-radius: 8px;
    padding: 1rem;
    border-left: 3px solid #667eea;
    transition: transform 0.3s, box-shadow 0.3s;
    margin-bottom: 0.75rem;
}

.announcement-card:hover {
    transform: translateX(3px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.announcement-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.announcement-actions {
    display: flex;
    gap: 0.25rem;
}

.btn-edit-announcement,
.btn-delete-announcement {
    background: none;
    border: none;
    font-size: 1rem;
    cursor: pointer;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.btn-edit-announcement:hover {
    background-color: #e3f2fd;
}

.btn-delete-announcement:hover {
    background-color: #ffebee;
}

.announcement-title {
    font-size: 1.1rem;
    color: #333;
    font-weight: bold;
    margin-bottom: 0.25rem;
    display: inline-block;
    margin-right: 0.5rem;
}

.announcement-type {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 500;
}

.type-lost {
    background: #fff3e0;
    color: #f57c00;
}

.type-found {
    background: #e8f5e9;
    color: #388e3c;
}

.announcement-info {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem 1rem;
    margin-bottom: 0.5rem;
}

.announcement-detail {
    color: #666;
    font-size: 0.85rem;
    line-height: 1.4;
}

.announcement-detail strong {
    color: #333;
    margin-right: 0.4rem;
}

.announcement-description {
    color: #666;
    line-height: 1.4;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
}

.announcement-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid #e0e0e0;
    font-size: 0.85rem;
    color: #666;
}

/* Адаптивность для карточек объявлений */
@media (max-width: 768px) {
    .announcement-info {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.4rem 0.75rem;
    }
    
    .announcement-card {
        padding: 0.75rem;
    }
    
    .announcement-title {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .announcement-info {
        grid-template-columns: 1fr;
        gap: 0.3rem;
    }
    
    .announcement-card {
        padding: 0.6rem;
    }
}

/* Help Page Styles */
.help-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    border-bottom: 2px solid #f0f0f0;
}

.help-tab-btn {
    padding: 1rem 1.5rem;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    font-size: 1rem;
    color: #666;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
}

.help-tab-btn:hover {
    color: #667eea;
}

.help-tab-btn.active {
    color: #667eea;
    border-bottom-color: #667eea;
}

.help-section {
    display: none;
    animation: fadeIn 0.3s;
}

.help-section.active {
    display: block;
}

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

.section-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid #f0f0f0;
}

.section-header h3 {
    color: #667eea;
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.section-header p {
    color: #666;
    font-size: 1.1rem;
}

/* Donations Section */
.donations-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.donation-info {
    background: #f9f9f9;
    padding: 2rem;
    border-radius: 15px;
}

.donation-info h4 {
    color: #667eea;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.donation-list {
    list-style: none;
    padding: 0;
}

.donation-list li {
    padding: 0.75rem 0;
    color: #666;
    font-size: 1rem;
    border-bottom: 1px solid #e0e0e0;
}

.donation-list li:last-child {
    border-bottom: none;
}

.donation-form-section {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.donation-form-section h4 {
    color: #667eea;
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
}

.amount-buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.amount-btn {
    padding: 0.75rem;
    background: #f5f5f5;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
}

.amount-btn:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.amount-btn.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

/* Volunteer Section */
.volunteer-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.volunteer-info h4 {
    color: #667eea;
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
}

.volunteer-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.volunteer-option {
    background: #f9f9f9;
    padding: 1.5rem;
    border-radius: 10px;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
}

.volunteer-option:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.option-icon {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.volunteer-option h5 {
    color: #333;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.volunteer-option p {
    color: #666;
    font-size: 0.9rem;
}

.volunteer-form-section {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.volunteer-form-section h4 {
    color: #667eea;
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
}

.checkbox-group {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: normal;
    cursor: pointer;
}

.checkbox-group input[type="checkbox"] {
    width: auto;
    cursor: pointer;
}

/* Clinics Section */
.clinics-content {
    display: block;
}

.clinics-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-height: 600px;
    overflow-y: auto;
}

.clinic-card {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.clinic-card:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.clinic-name {
    font-size: 1.2rem;
    color: #667eea;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.clinic-info {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.clinic-info strong {
    color: #333;
    margin-right: 0.5rem;
}

.clinic-hours {
    color: #999;
    font-size: 0.85rem;
    margin-top: 0.5rem;
}

/* Shelters Section */
.shelters-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
}

.shelter-card {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

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

.shelter-name {
    font-size: 1.5rem;
    color: #667eea;
    font-weight: bold;
    margin-bottom: 1rem;
}

.shelter-info {
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: start;
    gap: 0.5rem;
}

.shelter-info strong {
    color: #333;
    min-width: 100px;
}

.shelter-description {
    color: #666;
    line-height: 1.6;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e0e0e0;
}

/* Health Page Styles */
.shops-content,
.advice-content,
.news-content {
    margin-top: 2rem;
}

.shops-list,
.advice-list,
.news-list {
    display: grid;
    gap: 2rem;
}

/* Shop Cards */
.shop-card {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

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

.shop-name {
    font-size: 1.5rem;
    color: #667eea;
    font-weight: bold;
    margin-bottom: 1rem;
}

.shop-info {
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
}

.shop-info strong {
    color: #333;
    margin-right: 0.5rem;
}

.shop-description {
    color: #666;
    line-height: 1.6;
    margin: 1rem 0;
    padding: 1rem;
    background: #f9f9f9;
    border-radius: 8px;
}

.shop-products {
    color: #666;
    font-size: 0.9rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e0e0e0;
}

.shop-products strong {
    color: #333;
    margin-right: 0.5rem;
}

/* Advice Cards */
.advice-card {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    border-left: 4px solid #667eea;
}

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

.advice-header {
    margin-bottom: 1.5rem;
}

.advice-title {
    font-size: 1.5rem;
    color: #333;
    font-weight: bold;
    margin-bottom: 0.75rem;
}

.advice-meta {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    color: #666;
    font-size: 0.9rem;
}

.advice-author,
.advice-date,
.advice-category {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.advice-content {
    color: #666;
    line-height: 1.8;
}

.advice-content p {
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

.advice-tips {
    background: #f9f9f9;
    padding: 1.5rem;
    border-radius: 8px;
    margin-top: 1.5rem;
}

.advice-tips strong {
    color: #667eea;
    display: block;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.advice-tips ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.advice-tips li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
    color: #666;
}

.advice-tips li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #667eea;
    font-weight: bold;
}

/* News Cards */
.news-card {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    word-wrap: break-word;
    overflow-wrap: break-word;
    overflow-x: hidden;
}

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

.news-card.important {
    border-left: 4px solid #f5576c;
    background: #fff5f5;
}

.news-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.news-title {
    font-size: 1.4rem;
    color: #333;
    font-weight: bold;
    flex: 1;
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

.news-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: #f5576c;
    color: white;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.news-meta {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e0e0e0;
}

.news-date,
.news-source {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
}

.news-content {
    color: #666;
    line-height: 1.8;
    font-size: 1rem;
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

.news-content p {
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

/* Auth Page Styles */
.auth-container {
    max-width: 600px;
    margin: 0 auto;
    background: white;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    padding: 2rem;
}

.auth-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid #f0f0f0;
}

.auth-tab-btn {
    padding: 0.75rem 1.5rem;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    font-size: 1rem;
    color: #666;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
}

.auth-tab-btn:hover {
    color: #667eea;
}

.auth-tab-btn.active {
    color: #667eea;
    border-bottom-color: #667eea;
}

.auth-form-section {
    display: none;
}

.auth-form-section.active {
    display: block;
}

.auth-form h3 {
    color: #667eea;
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.auth-form form {
    display: flex;
    flex-direction: column;
}

.auth-form .submit-btn {
    width: 100%;
    margin-top: 1rem;
    display: block;
}

.user-type-selector {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.user-type-option {
    cursor: pointer;
}

.user-type-option input[type="radio"] {
    display: none;
}

.user-type-card {
    padding: 1.5rem;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    text-align: center;
    transition: all 0.3s;
    background: white;
}

.user-type-option input[type="radio"]:checked + .user-type-card {
    border-color: #667eea;
    background: #f0f4ff;
}

.user-type-card:hover {
    border-color: #667eea;
    transform: translateY(-2px);
}

.user-type-icon {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.user-type-label {
    color: #333;
    font-weight: 500;
    font-size: 1rem;
}

.user-info {
    max-width: 600px;
    margin: 0 auto;
    background: white;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    padding: 2rem;
}

.user-info h3 {
    color: #667eea;
    margin-bottom: 1.5rem;
    text-align: center;
}

.user-card {
    background: #f9f9f9;
    padding: 1.5rem;
    border-radius: 10px;
}

.user-type-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 500;
    margin-bottom: 1rem;
}

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

.user-type-badge.shelter {
    background: #fce4ec;
    color: #c2185b;
}

.user-type-badge.clinic {
    background: #e8f5e9;
    color: #388e3c;
}

.user-details {
    color: #666;
}

.user-details p {
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
}

.user-details strong {
    color: #333;
    margin-right: 0.5rem;
}

/* Footer */
footer {
    background: #333;
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: 3rem;
}

/* Стили для формы размещения животными передержками */
.shelter-form-section {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.shelter-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

/* Универсальные стили для btn-primary и btn-secondary */
.btn-primary {
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.4);
}

.btn-secondary:active {
    transform: translateY(0);
}

.btn-danger {
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.4);
}

.btn-danger:active {
    transform: translateY(0);
}

/* Специальные стили для кнопок в shelter-actions */
.shelter-actions .btn-primary,
.shelter-actions .btn-secondary {
    flex: 1;
    min-width: 200px;
}

.pet-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.photo-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.photo-preview img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid #e0e0e0;
}

.photo-preview-item {
    position: relative;
    display: inline-block;
}

.photo-preview-item img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid #e0e0e0;
    display: block;
}

.photo-preview-item .remove-photo {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #f56565;
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.photo-preview-item .remove-photo:hover {
    background: #e53e3e;
}

.pet-character {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    font-style: italic;
}

.btn-apply {
    width: 100%;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    margin-top: 1rem;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-apply:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-apply:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Модальное окно для управления заявками */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    border-radius: 15px;
    max-width: 1200px;
    width: 95%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #e0e0e0;
}

.modal-header h3 {
    margin: 0;
    color: #333;
}

.modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    color: #333;
}

.modal-body {
    padding: 1.5rem;
}

.applications-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.application-card {
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 1.5rem;
    background: #f9f9f9;
}

.application-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.application-header h4 {
    margin: 0;
    color: #333;
}

.application-status {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    color: white;
    font-size: 0.85rem;
    font-weight: 500;
}

.application-info {
    margin-bottom: 1rem;
}

.application-info p {
    margin: 0.5rem 0;
    color: #666;
    font-size: 0.9rem;
}

.status-select {
    width: 100% !important;
    padding: 0.5rem 2rem 0.5rem 0.75rem !important;
    border-radius: 8px !important;
    border: 2px solid #e0e0e0 !important;
    font-size: 0.9rem !important;
    background-color: white !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23667eea' d='M6 9L1 4h10z'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 0.5rem center !important;
    background-size: 12px !important;
    color: #333 !important;
    cursor: pointer !important;
    transition: all 0.3s !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    text-indent: 0.01px !important;
    text-overflow: '' !important;
}

.status-select:hover {
    border-color: #667eea !important;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.1) !important;
}

.status-select:focus {
    outline: none !important;
    border-color: #667eea !important;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1), 0 2px 8px rgba(102, 126, 234, 0.15) !important;
}

.status-select option {
    padding: 0.5rem !important;
    background: white !important;
    color: #333 !important;
    font-size: 0.9rem !important;
    line-height: 1.5 !important;
}

.status-select option:checked,
.status-select option[selected] {
    background: #f0f4ff !important;
    color: #667eea !important;
    font-weight: 500 !important;
}

.status-select option:hover {
    background: #f0f4ff !important;
    color: #667eea !important;
}

/* Стили для страницы профиля */
.profile-message {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 400px;
}

.message-box {
    background: white;
    border-radius: 15px;
    padding: 3rem;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    max-width: 500px;
}

.message-box h3 {
    color: #333;
    margin-bottom: 1rem;
}

.message-box p {
    color: #666;
    margin-bottom: 2rem;
}

.profile-section {
    max-width: 800px;
    margin: 0 auto;
}

.profile-card {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid #f0f0f0;
}

.profile-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
}

.profile-header h3 {
    margin: 0;
    color: #333;
}

.profile-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-hint {
    display: block;
    color: #999;
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

/* Специальные стили для кнопок в form-actions */
.form-actions .btn-primary,
.form-actions .btn-secondary,
.form-actions .btn-danger {
    flex: 1;
    min-width: 150px;
}

input[readonly] {
    background-color: #f5f5f5;
    cursor: not-allowed;
}

/* Стили для подтверждения телефона */
.phone-verification {
    display: flex;
    gap: 0.5rem;
    align-items: flex-start;
}

.phone-verification input {
    flex: 1;
}

.verify-btn {
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
    transition: all 0.3s;
}

.verify-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.verify-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.verification-status {
    margin-top: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
}

.verification-status.verified {
    background: #c6f6d5;
    color: #22543d;
    border: 1px solid #48bb78;
}

.verification-status.pending {
    background: #feebc8;
    color: #7c2d12;
    border: 1px solid #ed8936;
}

/* Стили для чекбокса соглашения */
.agreement-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
    font-size: 0.95rem;
    line-height: 1.5;
}

.agreement-checkbox input[type="checkbox"] {
    margin-top: 0.2rem;
    width: 18px;
    height: 18px;
    cursor: pointer;
    flex-shrink: 0;
}

.agreement-checkbox span {
    color: #666;
}

.agreement-checkbox a {
    color: #667eea;
    text-decoration: underline;
    transition: color 0.2s;
}

.agreement-checkbox a:hover {
    color: #764ba2;
}

/* Стили для страницы детального просмотра животного */
.pet-detail-container {
    max-width: 1200px;
    margin: 0 auto;
}

.pet-detail-card {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.pet-detail-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e0e0e0;
}

.back-link {
    display: inline-block;
    color: #667eea;
    text-decoration: none;
    margin-bottom: 1rem;
    font-weight: 500;
    transition: color 0.3s;
}

.back-link:hover {
    color: #764ba2;
}

.pet-detail-header h2 {
    font-size: 2rem;
    color: #333;
    margin: 0;
}

.pet-detail-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.pet-detail-photos {
    position: relative;
}

.pet-photos-gallery {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.pet-photo-item {
    width: 100%;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.pet-photo-item img {
    width: 100%;
    height: auto;
    display: block;
}

.pet-image-large {
    width: 100%;
    height: 400px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 8rem;
    color: white;
}

.pet-detail-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.pet-detail-badges {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.pet-detail-section {
    padding: 1rem 0;
}

.pet-detail-section h3 {
    font-size: 1.3rem;
    color: #333;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e0e0e0;
}

.pet-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.pet-info-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.info-label {
    font-size: 0.85rem;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-value {
    font-size: 1rem;
    color: #333;
    font-weight: 500;
}

.pet-description-text {
    color: #666;
    line-height: 1.8;
    font-size: 1rem;
}

.pet-character-text {
    color: #666;
    line-height: 1.8;
    font-size: 1rem;
    font-style: italic;
}

.shelter-name {
    font-size: 1.2rem;
    color: #667eea;
    font-weight: 600;
}

.pet-detail-actions {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 2px solid #e0e0e0;
}

.pet-detail-actions .btn-apply {
    width: 100%;
    padding: 1rem;
    font-size: 1.1rem;
}

.error-message {
    text-align: center;
    padding: 3rem;
    background: white;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.error-message h3 {
    font-size: 1.5rem;
    color: #e53e3e;
    margin-bottom: 1rem;
}

.error-message p {
    color: #666;
    margin-bottom: 2rem;
}

@media (max-width: 768px) {
    .container {
        padding: 0 14px;
    }
    
    header .container {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    /* Временно показываем обычное меню без бургера */
    .mobile-menu-btn {
        display: none;
    }
    
    nav {
        width: 100%;
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .nav-link {
        padding: 0.5rem 0.75rem;
        flex: 1 1 45%;
        text-align: center;
    }
    
    header {
        padding: 1rem 0;
    }
    
    .hero {
        padding: 3rem 0;
    }
    
    .banner-card {
        padding: 1.75rem 1.25rem;
    }
    
    .filters-section {
        padding: 1.5rem;
    }
    
    .pet-detail-content {
        grid-template-columns: 1fr;
    }
    
    .pet-info-grid {
        grid-template-columns: 1fr;
    }
}

/* Стили для ввода кода подтверждения */
.code-input-section {
    margin-top: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.code-input-section label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #333;
    font-size: 0.9rem;
}

.code-input-wrapper {
    display: flex;
    gap: 0.5rem;
    align-items: flex-start;
}

.code-input {
    flex: 1;
    padding: 0.75rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1.2rem;
    text-align: center;
    letter-spacing: 0.5rem;
    font-weight: bold;
    transition: all 0.3s;
}

.code-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.code-input:disabled {
    background-color: #f5f5f5;
    cursor: not-allowed;
}

.verify-code-btn {
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
    transition: all 0.3s;
}

.verify-code-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(72, 187, 120, 0.4);
}

.verify-code-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.verification-status.error {
    background: #fed7d7;
    color: #742a2a;
    border: 1px solid #fc8181;
}

/* Система уведомлений */
.notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 400px;
}

.notification {
    background: white;
    border-radius: 10px;
    padding: 1rem 1.5rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    gap: 1rem;
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.3s ease;
    min-width: 300px;
}

.notification.show {
    opacity: 1;
    transform: translateX(0);
}

.notification-icon {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.notification-success .notification-icon {
    background: #48bb78;
    color: white;
}

.notification-error .notification-icon {
    background: #f56565;
    color: white;
}

.notification-warning .notification-icon {
    background: #ed8936;
    color: white;
}

.notification-info .notification-icon {
    background: #4299e1;
    color: white;
}

.notification-message {
    flex: 1;
    color: #333;
    font-size: 0.95rem;
    line-height: 1.4;
}

.notification-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: color 0.2s;
}

.notification-close:hover {
    color: #333;
}

/* Модальное окно подтверждения */
.confirm-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    animation: fadeIn 0.2s;
}

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

.confirm-modal {
    background: white;
    border-radius: 15px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    animation: slideDown 0.3s;
}

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

.confirm-modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e0e0e0;
}

.confirm-modal-header h3 {
    margin: 0;
    color: #333;
    font-size: 1.25rem;
}

.confirm-modal-body {
    padding: 1.5rem;
}

.confirm-modal-body p {
    margin: 0;
    color: #666;
    font-size: 1rem;
    line-height: 1.6;
}

.confirm-modal-actions {
    padding: 1.5rem;
    border-top: 1px solid #e0e0e0;
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

.confirm-modal-actions .btn-primary,
.confirm-modal-actions .btn-secondary {
    min-width: 100px;
}

/* Responsive для уведомлений */
@media (max-width: 768px) {
    .notification-container {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
    
    .notification {
        min-width: auto;
        width: 100%;
    }
    
    .confirm-modal {
        width: 95%;
    }
    
    .confirm-modal-actions {
        flex-direction: column-reverse;
    }
    
    .confirm-modal-actions .btn-primary,
    .confirm-modal-actions .btn-secondary {
        width: 100%;
    }
    
    .profile-card {
        padding: 1.5rem;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .form-actions .btn-primary,
    .form-actions .btn-secondary,
    .form-actions .btn-danger {
        width: 100%;
    }
    
    .shelter-actions {
        flex-direction: column;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        width: 95%;
    }
    
    /* настройки шапки перенесены выше для бургер-меню */

    .hero h2 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .banner-grid {
        grid-template-columns: 1fr;
    }

    .banner-card {
        padding: 2rem 1.5rem;
    }

    .page-header h2 {
        font-size: 2rem;
    }

    .page-header p {
        font-size: 1rem;
    }

    .counter-number {
        font-size: 2rem;
    }

    .filters {
        grid-template-columns: 1fr;
    }

    .catalog-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .pets-grid {
        grid-template-columns: 1fr;
    }

    .forms-container {
        grid-template-columns: 1fr;
    }

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

    .announcement-info {
        grid-template-columns: 1fr;
    }

    .help-tabs {
        flex-direction: column;
    }

    .help-tab-btn {
        width: 100%;
        text-align: left;
    }

    .donations-content,
    .volunteer-content,
    .clinics-content {
        grid-template-columns: 1fr;
    }

    .volunteer-options {
        grid-template-columns: 1fr;
    }

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

    .checkbox-group {
        grid-template-columns: 1fr;
    }

    .shelters-list {
        grid-template-columns: 1fr;
    }

    .shops-list,
    .advice-list,
    .news-list {
        grid-template-columns: 1fr;
    }

    .advice-meta,
    .news-meta {
        flex-direction: column;
        gap: 0.5rem;
    }

    .user-type-selector {
        grid-template-columns: 1fr;
    }
    
    .phone-verification {
        flex-direction: column;
    }
    
    .verify-btn {
        width: 100%;
    }
    
    .code-input-wrapper {
        flex-direction: column;
    }
    
    .verify-code-btn {
        width: 100%;
    }
    
    /* Исправление для секции экстренных ситуаций на мобильных */
    .emergency-text-section {
        padding: 1rem !important;
        margin-top: 1.5rem !important;
    }
    
    .emergency-text-section > div {
        flex-direction: column !important;
        gap: 1rem !important;
    }
    
    #emergencyImageContainer {
        width: 100% !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        gap: 0.75rem !important;
    }
    
    #emergencyImageContainer img,
    .emergency-image {
        max-width: 100% !important;
        max-height: 250px !important;
        width: auto !important;
        height: auto !important;
        margin-right: 0 !important;
    }
    
    #emergencyTextContainer {
        width: 100% !important;
        min-width: 100% !important;
    }
    
    #emergencyText {
        font-size: 1rem !important;
        line-height: 1.5 !important;
    }
    
    /* Добавляем отступ снизу для контента, чтобы текст не обрезался навигационной панелью браузера */
    main {
        padding-bottom: 100px;
    }
    
    .content {
        padding-bottom: 100px;
    }
    
    .help-section {
        padding-bottom: 20px;
    }
    
    .news-list {
        padding-bottom: 20px;
    }
    
    .news-card,
    .advice-card {
        margin-bottom: 1.5rem;
        padding: 1.5rem !important;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
        overflow-x: hidden !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    
    .news-title {
        font-size: 1.2rem !important;
        word-wrap: break-word !important;
        word-break: break-word !important;
        overflow-wrap: break-word !important;
        line-height: 1.4 !important;
    }
    
    .news-content,
    .advice-content {
        padding-bottom: 1rem;
        word-wrap: break-word !important;
        word-break: break-word !important;
        overflow-wrap: break-word !important;
    }
    
    .news-content p {
        word-wrap: break-word !important;
        word-break: break-word !important;
        overflow-wrap: break-word !important;
    }
    
    .news-meta {
        flex-direction: column !important;
        gap: 0.5rem !important;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
    }
    
    .news-date,
    .news-source {
        word-wrap: break-word !important;
        word-break: break-word !important;
        overflow-wrap: break-word !important;
    }
    
    /* Улучшаем отображение счетчика на мобильных */
    .counter-box {
        padding: 1rem 2rem !important;
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 12px;
    }
    
    .nav-link {
        width: 100%;
        text-align: center;
    }
    
    .hero {
        padding: 2.5rem 0;
    }
    
    .filters-section {
        padding: 1.25rem;
    }
    
    .banner-card {
        padding: 1.5rem 1.1rem;
    }
    
    /* Дополнительные исправления для очень маленьких экранов */
    .counter-box {
        padding: 0.75rem 1.5rem !important;
    }
    
    .counter-number {
        font-size: 2.5rem !important;
    }
    
    .emergency-text-section {
        padding: 0.75rem !important;
    }
    
    #emergencyImageContainer img,
    .emergency-image {
        max-height: 200px !important;
    }
    
    /* Дополнительные стили для новостей на очень маленьких экранах */
    .news-card {
        padding: 1rem !important;
    }
    
    .news-title {
        font-size: 1.1rem !important;
    }
    
    .news-content {
        font-size: 0.95rem !important;
        line-height: 1.6 !important;
    }
    
    main {
        padding-bottom: 120px !important;
    }
    
    .content {
        padding-bottom: 120px !important;
    }
}

