:root {
    --primary-color: #1a73e8;
    --secondary-color: #5f6368;
    --background-color: #f8f9fa;
    --border-color: #e0e0e0;
    --hover-color: #f1f3f4;
    --text-color: #202124;
    --border-radius: 4px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    background-color: var(--background-color);
    color: var(--text-color);
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

h1 {
    font-size: 24px;
    margin-bottom: 1.5rem;
    color: var(--text-color);
}

/* Search Section */
.search-section {
    margin-bottom: 1.5rem;
}

.search-bar {
    position: relative;
    max-width: 100%;
    background: white;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    padding: 0.5rem;
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--secondary-color);
}

#searchInput {
    width: 100%;
    padding: 0.5rem 0.5rem 0.5rem 2.5rem;
    border: none;
    font-size: 16px;
    outline: none;
}

/* Filter Options */
.filter-options {
    margin: 1rem 0;
}

.filter-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.filter-select {
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background-color: white;
    min-width: 150px;
}

.company-description {
    position: relative;
    margin: 0;
    line-height: 1.5;
}

.company-description .truncated-text,
.company-description .remaining-text {
    display: inline;
}

.company-description .remaining-text {
    display: none;
}

.read-more-btn {
    color: var(--primary-color);
    cursor: pointer;
    border: none;
    background: none;
    padding: 0;
    margin-left: 4px;
    font-size: inherit;
    font-family: inherit;
    text-decoration: underline;
    transition: color 0.2s ease;
}

.read-more-btn:hover {
    color: #0056b3;
}

.company-description.expanded .truncated-text {
    display: none;
}

.company-description.expanded .remaining-text {
    display: inline;
}

.company-description.expanded .read-more-btn {
    text-decoration: none;
}

.filter-row {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.5rem 1rem;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-color);
}

.filter-btn:hover {
    background: var(--hover-color);
}

.arrow {
    font-size: 10px;
}

/* Results Header */
.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.results-count {
    font-size: 14px;
    color: var(--secondary-color);
}

.share-btn {
    padding: 0.5rem 1rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
}

/* Companies Table */
.companies-table {
    background: white;
    border-radius: var(--border-radius);
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    text-align: left;
    padding: 1rem;
    font-size: 12px;
    color: var(--secondary-color);
    border-bottom: 1px solid var(--border-color);
    font-weight: 500;
}

td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    font-size: 14px;
}

.company-row:hover {
    background: var(--hover-color);
    cursor: pointer;
}

.company-logo {
    width: 4%;
    height: 40px;
    object-fit: contain;
    border-radius: 4px;
    background-color: white;
    padding: 2px;
    border: 1px solid var(--border-color);
}

.company-logo-placeholder {
    width: 40px;
    height: 40px;
    border-radius: 4px;
    background-color: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: bold;
}

.company-logo-name {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.company-logo,
.company-logo-placeholder {
    width: 50px;
    height: 50px;
    border-radius: 1px;
    background: var(--hover-color);
}

/* Responsive Design */
@media (max-width: 1200px) {
    .container {
        padding: 1rem;
    }

    .filter-row {
        gap: 0.25rem;
    }

    .filter-btn {
        padding: 0.4rem 0.8rem;
        font-size: 13px;
    }
}

@media (max-width: 768px) {
    .companies-table {
        font-size: 14px;
    }

    td, th {
        padding: 0.75rem;
    }

    .filter-row {
        flex-direction: column;
    }

    .filter-dropdown {
        width: 100%;
    }

    .filter-btn {
        width: 100%;
        justify-content: space-between;
    }
}

/* Remove these classes as they're no longer needed */
.upload-section,
.upload-section form,
.upload-section input[type="file"],
.upload-section button,
.upload-section button:hover {
    display: none;
}

/* Add these new styles */
.company-row {
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.company-row:hover {
    background-color: var(--hover-color);
}

.company-row.active {
    background-color: var(--hover-color);
}

.company-details-row td {
    padding: 0;
    background-color: var(--background-color);
}

.company-details {
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
    animation: slideDown 0.3s ease-out;
}

.details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.detail-item h4 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
}

.detail-item p {
    color: var(--text-color);
    font-size: 0.9rem;
    line-height: 1.4;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.page-link {
    padding: 0.5rem 1rem;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    color: var(--text-color);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
}

.page-link:hover,
.page-link.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.toggle-btn {
    padding: 0.4rem 0.8rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 12px;
    white-space: nowrap;
}

.toggleable {
    transition: all 0.3s ease;
}

.toggleable.hidden {
    display: none;
}

/* Add these new styles */
.website-link {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.9rem;
}

.website-link:hover {
    text-decoration: underline;
}

.social-links {
    display: flex;
    gap: 0.5rem;
}

.social-icon {
    padding: 0.3rem 0.6rem;
    border-radius: var(--border-radius);
    font-size: 0.8rem;
    text-decoration: none;
    color: white;
}

.social-icon.linkedin {
    background-color: #0077b5;
}

.social-icon.facebook {
    background-color: #1877f2;
}

.social-icon.twitter {
    background-color: #1da1f2;
}

.social-links-detailed {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
}

.social-links-detailed a {
    color: var(--primary-color);
    text-decoration: none;
}

.social-links-detailed a:hover {
    text-decoration: underline;
}

/* Add these responsive styles */
@media screen and (max-width: 1200px) {
    .toggleable {
        display: none;
    }
    
    .company-details-row td {
        padding: 10px;
    }
    
    .details-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

@media screen and (max-width: 992px) {
    th:nth-child(5),
    th:nth-child(6),
    td:nth-child(5),
    td:nth-child(6) {
        display: none;
    }
    
    .company-details {
        padding: 1rem;
    }
}

@media screen and (max-width: 768px) {
    th:nth-child(4),
    th:nth-child(7),
    td:nth-child(4),
    td:nth-child(7) {
        display: none;
    }
    
    .company-logo {
        width: 30px;
        height: 30px;
    }
    
    .company-logo-placeholder {
        width: 30px;
        height: 30px;
        font-size: 1rem;
    }
    
    .company-logo-name {
        gap: 0.5rem;
    }
}

@media screen and (max-width: 576px) {
    .company-name {
        max-width: 150px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    th:nth-child(2),
    td:nth-child(2) {
        display: none;
    }
    
    .details-grid {
        font-size: 0.9rem;
    }
    
    .company-details h4 {
        font-size: 0.9rem;
    }
}

/* Update existing styles */
.company-row {
    transition: all 0.3s ease;
}

.company-details-row {
    transition: all 0.3s ease;
}

.company-details {
    transition: padding 0.3s ease;
}

.show-results-btn {
    padding: 0.5rem 1.5rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.show-results-btn:hover {
    background-color: var(--primary-color-dark);
}

.clear-btn {
    padding: 0.5rem 1rem;
    background-color: #f44336;
    color: white;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.clear-btn:hover {
    background-color: #d32f2f;
}

.filter-input-group {
    position: relative;
    flex: 1;
    min-width: 200px;
}

.filter-select {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background-color: white;
    font-size: 14px;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.5rem center;
    background-size: 1em;
}

.filter-select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.filter-input {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 14px;
    background-color: white;
}

.filter-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.filter-options {
    margin: 1rem 0;
    background: white;
    padding: 1rem;
    border-radius: var(--border-radius);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.filter-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.filter-row:last-child {
    margin-bottom: 0;
}

.clear-btn {
    padding: 0.5rem 1.5rem;
    background-color: #f44336;
    color: white;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.3s ease;
    min-width: 120px;
}

.clear-btn:hover {
    background-color: #d32f2f;
}

.home-button {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    background-color: #007bff;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    margin-left: 10px;
    min-width: 120px;
    text-align: center;
}

.home-button:hover {
    background-color: #0056b3;
}