/* Стили для страницы компании */
.company-cover {
    width: 100%;
    height: 300px;
    overflow: hidden;
    border-radius: 8px;
    margin-bottom: 20px;
}

.cover-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.company-header-with-logo {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 20px;
}

.company-logo-container {
    flex-shrink: 0;
}

.logo-image {
    width: 120px;
    height: 120px;
    border-radius: 8px;
    object-fit: cover;
    border: 3px solid #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.company-header-info {
    flex: 1;
}

.company-badges-list {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.badge.verified {
    background-color: #10b981;
    color: white;
}

.badge.type {
    background-color: #3b82f6;
    color: white;
}

.company-details-page {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.content {
    line-height: 1.6;
    margin-bottom: 20px;
    font-size: 16px;
}

.company-details {
    display: grid;
    gap: 12px;
    margin-bottom: 20px;
}

.detail-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.detail-item strong {
    min-width: 100px;
    color: #374151;
}

.company-tags {
    margin-bottom: 20px;
}

.tags-section {
    margin-bottom: 10px;
}

.tags-section strong {
    display: block;
    margin-bottom: 5px;
    color: #374151;
}

.tag {
    display: inline-block;
    background: #f3f4f6;
    padding: 4px 8px;
    border-radius: 4px;
    margin: 2px;
    font-size: 12px;
}

.tag.category {
    background: #dbeafe;
    color: #1e40af;
}

.company-meta-info {
    display: flex;
    align-items: center;
    gap: 20px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
    font-size: 14px;
    color: #6b7280;
}

.created-date,
.view-count,
.subscribers-count {
    display: flex;
    align-items: center;
}

.company-social-links {
    margin-top: 20px;
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.company-social-links h3 {
    margin-bottom: 15px;
    color: #374151;
}

.social-links-container {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.social-link {
    display: inline-block;
    padding: 8px 16px;
    background: #3b82f6;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    transition: background-color 0.2s;
}

.social-link:hover {
    background: #2563eb;
}

/* Стили для страницы "Мои компании" - карточки */
.companies-list-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
}

.company-item-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.company-item-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.company-images {
    position: relative;
    height: 160px;
    overflow: hidden;
}

.company-cover-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.company-cover-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
}

.company-logo-overlay {
    position: absolute;
    bottom: -20px;
    left: 20px;
    width: 80px;
    height: 80px;
    border-radius: 8px;
    border: 4px solid white;
    background: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.company-logo-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

.company-card-content {
    padding: 30px 20px 20px;
}

.company-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.company-card-name {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
    flex: 1;
    margin-right: 10px;
}

.company-card-badges {
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: flex-end;
}

.badge.draft {
    background-color: #f59e0b;
    color: white;
}

.company-card-type {
    color: #6b7280;
    font-size: 14px;
    margin-bottom: 8px;
}

.company-card-location {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #6b7280;
    font-size: 14px;
    margin-bottom: 12px;
}

.location-icon {
    font-size: 12px;
}

.company-card-description {
    color: #4b5563;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.company-card-stats {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #9ca3af;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f3f4f6;
}

.company-card-actions {
    display: flex;
    gap: 8px;
}

.action-btn {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
    flex: 1;
}

.action-btn-primary {
    background-color: #3b82f6;
    color: white;
}

.action-btn-primary:hover {
    background-color: #2563eb;
}

.action-btn-outline {
    background-color: white;
    color: #374151;
    border: 1px solid #d1d5db;
}

.action-btn-outline:hover {
    background-color: #f9fafb;
    border-color: #9ca3af;
}

.action-btn-danger {
    background-color: #ef4444;
    color: white;
}

.action-btn-danger:hover {
    background-color: #dc2626;
}

.action-btn-secondary {
    background-color: #6b7280;
    color: white;
}

.action-btn-secondary:hover {
    background-color: #4b5563;
}

/* Стили для пустого состояния */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    grid-column: 1 / -1;
}

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

.empty-state h2 {
    color: #374151;
    margin-bottom: 12px;
    font-size: 24px;
}

.empty-state p {
    color: #6b7280;
    margin-bottom: 24px;
    font-size: 16px;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

/* Адаптивность */
@media (max-width: 768px) {
    .company-header-with-logo {
        flex-direction: column;
        text-align: center;
    }

    .logo-image {
        width: 100px;
        height: 100px;
    }

    .company-cover {
        height: 200px;
    }

    .company-meta-info {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }

    .detail-item {
        flex-direction: column;
        gap: 4px;
    }

    .detail-item strong {
        min-width: auto;
    }

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

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

    .company-card-badges {
        flex-direction: row;
        margin-top: 8px;
        align-self: flex-start;
    }

    .company-card-actions {
        flex-direction: column;
    }

    .empty-state {
        padding: 40px 20px;
    }

    .empty-state-icon {
        font-size: 48px;
    }
}

/* СТИЛИ ДЛЯ ФОРМЫ */
.form-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.form-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.form-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px 40px;
}

.form-header h1 {
    margin: 0;
    font-size: 28px;
    font-weight: 700;
}

.form-header p {
    margin: 8px 0 0 0;
    opacity: 0.9;
    font-size: 16px;
}

.form-body {
    padding: 40px;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    margin-bottom: 32px;
}

.form-column {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-section {
    margin-bottom: 32px;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #f3f4f6;
}

.section-icon {
    width: 24px;
    height: 24px;
    background: #3b82f6;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
}

.section-title {
    font-size: 20px;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
}

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

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #374151;
    font-size: 14px;
}

.form-label.required:after {
    content: " *";
    color: #ef4444;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 15px;
    transition: all 0.3s ease;
    background: white;
    font-family: inherit;
}

.form-control:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-control::placeholder {
    color: #9ca3af;
}

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

.description-textarea {
    min-height: 150px;
}

.file-hint {
    font-size: 12px;
    color: #6b7280;
    margin-top: 4px;
    font-style: italic;
}

.image-preview {
    margin-top: 12px;
    text-align: center;
}

.image-preview img {
    max-width: 200px;
    max-height: 150px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
}

.checkbox {
    width: 18px;
    height: 18px;
    border: 2px solid #d1d5db;
    border-radius: 4px;
    cursor: pointer;
}

.checkbox-label {
    margin: 0;
    font-weight: 500;
    color: #374151;
    cursor: pointer;
}

.map-widget {
    margin: 20px 0;
}

#map {
    width: 100%;
    height: 400px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 16px;
}

.map-search-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 14px;
    margin-bottom: 16px;
}

.coordinates-display {
    background: #f8fafc;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    padding: 12px 16px;
    font-family: monospace;
    font-size: 14px;
    color: #374151;
}

.form-actions {
    display: flex;
    gap: 16px;
    justify-content: flex-end;
    margin-top: 40px;
    padding-top: 32px;
    border-top: 2px solid #f3f4f6;
}

.form-btn {
    padding: 14px 32px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.form-btn-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.form-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

.form-btn-secondary {
    background: white;
    color: #374151;
    border: 2px solid #e5e7eb;
}

.form-btn-secondary:hover {
    background: #f9fafb;
    border-color: #d1d5db;
}

.d-none {
    display: none !important;
}

.horizontal_header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 20px;
}

.header-title {
    font-size: 32px;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: white;
    color: #374151;
    text-decoration: none;
    border-radius: 10px;
    border: 2px solid #e5e7eb;
    font-weight: 500;
    transition: all 0.3s ease;
}

.back-link:hover {
    background: #f9fafb;
    border-color: #d1d5db;
    transform: translateY(-1px);
}

.leaflet-control-attribution {
    display: none;
}

.preview-images-container,
.empty-images-container {
    text-align: center;
    margin-bottom: 10px;
    background-color: black !important;
    border-radius: 10px;
}

/* Адаптивность формы */
@media (max-width: 1024px) {
    .form-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

@media (max-width: 768px) {
    .form-body {
        padding: 24px;
    }

    .form-header {
        padding: 24px;
    }

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

    .form-btn {
        width: 100%;
        justify-content: center;
    }

    .horizontal_header {
        flex-direction: column;
        gap: 16px;
        align-items: flex-start;
    }
}
