/* Company Profile View Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, 'Montserrat', 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

body {
    color: #333;
    line-height: 1.5;
    background-color: #f5f5f5;
    overflow-x: hidden;
}

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

/* Header Styles */
.top-nav {
    background-color: #fff;
    border-bottom: 1px solid #e0e0e0;
    padding: 12px 0;
}

.top-nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Top Navigation for Authorized User */
nav.top-nav-auth {
    background-color: #fff;
    border-bottom: 2px solid #2688eb;
    padding: 16px 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 1001;
    overflow-x: visible;
}

nav.top-nav-auth .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-links {
    display: flex;
    gap: 24px;
}

.nav-links a {
    text-decoration: none;
    color: #2688eb;
    font-size: 14px;
    font-weight: 500;
}

.nav-links a:hover {
    color: #1a6ec0;
}

.nav-right {
    display: flex;
    gap: 24px;
}

.login-link {
    color: #2688eb;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}

/* Dropdown Menu Styles */
.dropdown {
    position: relative;
}

.dropdown-toggle {
    background: none;
    border: none;
    font-size: 20px;
    color: #333;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

.dropdown-toggle:hover {
    background-color: #f5f5f5;
}

.dropdown.active .dropdown-toggle {
    background-color: #f5f5f5;
    color: #2688eb;
}

.top-nav-auth .dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    width: 250px;
    z-index: 1000;
    margin-top: 10px;
    animation: fadeIn 0.2s ease-in-out;
}

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

.top-nav-auth .dropdown.active .dropdown-menu {
    display: block;
}

.dropdown-item {
    display: block;
    padding: 12px 16px;
    text-decoration: none;
    color: #333;
    font-size: 14px;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s;
}

.dropdown-item:last-child {
    border-bottom: none;
}

.dropdown-item:hover {
    background-color: #f5f5f5;
    color: #2688eb;
}

.dropdown-item.active {
    background-color: #f0f7ff;
    color: #2688eb;
}

.dropdown-divider {
    height: 1px;
    background-color: #e0e0e0;
    margin: 8px 0;
}

/* Main Header */
.main-header {
    background-color: #fff;
    padding: 20px 0;
    border-bottom: 1px solid #e0e0e0;
}

.header-content {
    display: flex;
    align-items: center;
    gap: 30px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #2688eb;
    font-weight: 700;
    font-size: 22px;
    text-decoration: none;
    white-space: nowrap;
}

.logo i {
    font-size: 24px;
}

.logo img {
    height: 67px;
}

/* Breadcrumbs */
.breadcrumbs {
    background-color: #fff;
    padding: 7px 0;
    border-bottom: 1px solid #e0e0e0;
}

.breadcrumb-links {
    display: flex;
    gap: 8px;
    font-size: 13px;
}

.breadcrumb-links a {
    text-decoration: none;
    color: #2688eb;
}

.breadcrumb-links span {
    color: #777;
}

/* Main Content */
.main-content {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 30px;
    margin: 30px 0 40px;
}

/* Company Profile */
.company-profile {
    background-color: #fff;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.company-header {
    display: flex;
    align-items: flex-start;
    gap: 25px;
    margin-bottom: 30px;
    padding-bottom: 25px;
    border-bottom: 1px solid #eee;
}

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

.company-logo {
    width: 120px;
    height: 120px;
    border-radius: 12px;
    background-color: #ffdd2d;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 36px;
    color: #333;
    overflow: hidden;
}

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

.company-logo.has-logo {
    background: none;
}

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

.company-name {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
    color: #333;
}

.company-legal-name {
    font-size: 16px;
    color: #777;
    margin-bottom: 15px;
}

.company-website {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #2688eb;
    text-decoration: none;
    font-size: 16px;
    margin-bottom: 20px;
}

.company-website:hover {
    text-decoration: underline;
}

.company-stats {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
    margin-bottom: 30px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
    text-decoration: none;
    color: inherit;
}

a.stat-item:hover .stat-value {
    color: #2688eb;
}

a.stat-item {
    cursor: pointer;
}

.stat-value {
    font-size: 20px;
    font-weight: 600;
    color: #333;
}

.stat-label {
    font-size: 14px;
    color: #777;
}

/* Source attribution in header (bottom-right corner) */
.company-header-source {
    margin-left: auto;
    text-align: right;
    margin-top: 8px;
}

.source-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.source-link span {
    font-size: 13px;
    color: #999;
    white-space: nowrap;
}

.source-link img {
    display: block;
    width: 100px;
    height: auto;
}

.source-link:hover {
    opacity: 0.8;
}

/* Financial results chart */
.company-financial-chart {
    margin-bottom: 30px;
    padding: 20px;
    border: 1px solid #e8edf2;
    border-radius: 8px;
}

.financial-chart-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
}

.financial-chart-title {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.financial-chart-legend {
    display: flex;
    align-items: center;
    gap: 18px;
}

.legend-item {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 14px;
    color: #555;
}

.legend-swatch {
    display: inline-block;
    width: 16px;
    height: 4px;
    border-radius: 2px;
}

.legend-swatch-revenue {
    background-color: #5C9BD6;
}

.legend-swatch-profit {
    background-color: #61B364;
}

.financial-chart-svg {
    display: block;
    height: auto;
}

/* Tooltip */
.financial-chart-body {
    position: relative;
}

.fc-hit {
    cursor: pointer;
}

.financial-chart-tooltip {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 10;
    min-width: 150px;
    padding: 8px 12px;
    background-color: #333;
    color: #fff;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.5;
    pointer-events: none;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

.fc-tooltip-year {
    font-weight: 600;
    margin-bottom: 4px;
}

.fc-tooltip-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    white-space: nowrap;
}

.fc-tooltip-row::before {
    content: '';
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 3px;
    margin-right: 7px;
    flex-shrink: 0;
}

.fc-row-revenue::before {
    background-color: #5C9BD6;
}

.fc-row-profit::before {
    background-color: #61B364;
}

.fc-axis-label {
    font-size: 12px;
    fill: #8a94a0;
}

.fc-unit-label {
    font-size: 11px;
    fill: #a5adb6;
}

@media (max-width: 768px) {
    .company-financial-chart {
        padding: 12px;
    }

    .financial-chart-title {
        font-size: 17px;
    }

    .financial-chart-legend {
        gap: 12px;
    }

    .legend-item {
        font-size: 13px;
    }

    .financial-chart-tooltip {
        font-size: 12px;
        padding: 6px 10px;
        min-width: 130px;
    }
}

.company-description {
    margin-bottom: 30px;
}

.description-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #333;
}

.description-text {
    font-size: 16px;
    color: #555;
    line-height: 1.6;
}

.company-actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 30px;
    padding-top: 25px;
    border-top: 1px solid #eee;
}

.action-btn {
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid #ddd;
    background-color: #fff;
    transition: all 0.2s;
}

.action-btn.report {
    color: #ff5252;
    border-color: #ff5252;
}

.action-btn.report:hover {
    background-color: #ffebee;
}

.action-btn.claim {
    color: #2688eb;
    border-color: #2688eb;
}

.action-btn.claim:hover {
    background-color: #f0f7ff;
}

.action-btn.subscribe {
    background-color: #2688eb;
    color: white;
    border-color: #2688eb;
}

.action-btn.subscribe:hover {
    background-color: #1a6ec0;
    border-color: #1a6ec0;
}

/* Company Vacancies */
.company-vacancies {
    background-color: #fff;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-top: 30px;
}

.vacancies-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.vacancies-title {
    font-size: 20px;
    font-weight: 600;
    color: #333;
}

.all-vacancies-link {
    color: #2688eb;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
}

.all-vacancies-link:hover {
    text-decoration: underline;
}

.vacancies-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.vacancy-item {
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    transition: all 0.2s;
}

.vacancy-item:hover {
    border-color: #2688eb;
    box-shadow: 0 4px 8px rgba(38, 136, 235, 0.1);
}

.vacancy-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
    text-decoration: none;
    display: block;
}

.vacancy-title:hover {
    color: #2688eb;
}

.vacancy-salary {
    color: #333;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
}

.vacancy-info {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.vacancy-tag {
    background-color: #f0f7ff;
    color: #2688eb;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
}

.vacancy-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #777;
    font-size: 14px;
}

/* Sidebar */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.company-sidebar-card {
    background-color: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.sidebar-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #333;
}

.company-details {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    padding-bottom: 10px;
    border-bottom: 1px solid #f0f0f0;
}

.detail-label {
    color: #777;
    font-size: 14px;
}

.detail-value {
    color: #333;
    font-size: 14px;
    font-weight: 500;
}

/* Бейдж аккредитованной ИТ-компании после названия компании */
.it-accreditation-badge {
    display: inline-block;
    background-color: #28a745;
    color: #fff;
    font-size: 10px;
    font-weight: 500;
    padding: 2px 8px;
    border-radius: 4px;
    vertical-align: middle;
    margin-left: 8px;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.profile-link {
    color: #333;
    font-size: 14px;
    font-weight: 500;
}

.industry-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.industry-tag {
    background-color: #f0f7ff;
    color: #2688eb;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 13px;
}

.company-category-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

.category-chip {
    display: inline-block;
    background-color: #e8f5e9;
    color: #2e7d32;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
}

.company-rating {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.rating-value {
    font-size: 24px;
    font-weight: 700;
    color: #333;
}

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

.rating-count {
    color: #777;
    font-size: 14px;
}

.reviews-link {
    color: #2688eb;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    margin-top: 10px;
    display: inline-block;
}

.reviews-link:hover {
    text-decoration: underline;
}

/* Modal Popup Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background-color: #fff;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    padding: 30px;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 24px;
    color: #777;
    cursor: pointer;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

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

.modal-title {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #333;
}

.modal-text {
    margin-bottom: 20px;
    color: #555;
    line-height: 1.5;
}

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

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

.form-input, .form-select, .form-textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 15px;
    transition: border-color 0.2s;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
    outline: none;
    border-color: #2688eb;
}

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

.modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 25px;
}

.modal-btn {
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid #ddd;
    background-color: #fff;
    transition: all 0.2s;
}

.modal-btn.cancel {
    color: #777;
}

.modal-btn.cancel:hover {
    background-color: #f5f5f5;
}

.modal-btn.submit {
    background-color: #2688eb;
    color: white;
    border-color: #2688eb;
}

.modal-btn.submit:hover {
    background-color: #1a6ec0;
    border-color: #1a6ec0;
}

.modal-btn.close {
    background-color: #2688eb;
    color: white;
    border-color: #2688eb;
    width: 100%;
}

.modal-btn.close:hover {
    background-color: #1a6ec0;
    border-color: #1a6ec0;
}

/* Responsive */
@media (max-width: 992px) {
    .main-content {
        grid-template-columns: 1fr;
    }

    .header-content {
        flex-direction: column;
        gap: 15px;
    }

    .search-container {
        width: 100%;
    }

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

    .company-header-source {
        margin-left: 0;
        align-self: center;
    }

    .company-main-info {
        text-align: center;
    }

    .company-stats {
        justify-content: center;
    }

    .company-actions {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .company-profile {
        padding: 20px 15px;
    }

    .company-logo {
        width: 100px;
        height: 100px;
        font-size: 30px;
    }

    .company-name {
        font-size: 22px;
    }

    .company-description {
        font-size: 14px;
    }

    .company-website {
        font-size: 14px;
    }

    .stat-value {
        font-size: 18px;
    }

    .stat-label {
        font-size: 12px;
    }

    .action-btn {
        padding: 10px 12px;
        font-size: 14px;
    }

    .modal-content {
        padding: 20px 15px;
    }

    .sidebar {
        margin-top: 20px;
    }
    
   .top-nav .container {
        flex-direction: column;
        gap: 10px;
    }

    .top-nav .nav-links {
        gap: 16px;
    }

}

/* Company Vacancies Sidebar */
.similar-vacancies-card {
    background-color: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.similar-vacancies-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
}

.similar-vacancies-title i {
    color: #2688eb;
}

.similar-vacancies-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.similar-vacancy-item {
    text-decoration: none;
    display: block;
    padding: 12px;
    border-radius: 6px;
    background-color: #f8f9fa;
    transition: background-color 0.2s;
}

.similar-vacancy-item:hover {
    background-color: #f0f7ff;
}

.similar-vacancy-title {
    font-size: 14px;
    font-weight: 600;
    color: #2688eb;
    margin-bottom: 4px;
    line-height: 1.3;
}

.similar-vacancy-item:hover .similar-vacancy-title {
    color: #1a6ec0;
}

.similar-vacancy-salary {
    font-size: 13px;
    font-weight: 600;
    color: #333;
}
