/* Englobe Corp Color Palette */
:root {
    --color-green-900: #0b8072;
    --color-yellow-900: #ffd040;
    --color-red-900: #ea554e;
    --color-black-900: #323e48;
    --color-white-900: #fff;
    --color-error-900: #9f0100;
    --color-green-500: #8bc9ba;
    --color-yellow-500: #fff1c4;
    --color-red-500: #efa693;
    --color-black-500: #9ea1a1;
    --color-white-500: #fff;
    --color-green-200: #d1e9e3;
    --color-yellow-200: #fff7dc;
    --color-red-200: #ffcdc0;
    --color-black-200: #cfd2d4;
    --color-white-200: #fff;
}

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'TT-hoves', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--color-black-900);
    background-color: var(--color-green-200);
}
/* Logo Section */
.logo-section {
    text-align: center;
    padding: 1rem 0;
    background: var(--color-white-900);
    border-bottom: 1px solid var(--color-black-200);
    margin-bottom: 1rem;
}

.corporate-logo {
    max-height: 80px;
    max-width: 300px;
    height: auto;
    width: auto;
}


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

/* Header */
header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

header h1 {
    color: var(--color-black-900);
    margin-bottom: 10px;
}

header p {
    color: var(--color-black-500);
    font-size: 1.1em;
}

/* Search section */
.search-section {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.search-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

#searchInput {
    flex: 1;
    padding: 12px;
    border: 2px solid #e1e8ed;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s;
}

#searchInput:focus {
    outline: none;
    border-color: var(--color-green-900);
}

#searchBtn {
    padding: 12px 24px;
    background: var(--color-green-900);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.3s;
}

#searchBtn:hover {
    background: var(--color-green-500);
}

.filters {
    display: flex;
    gap: 15px;
    align-items: center;
}

.filters select {
    padding: 10px;
    border: 2px solid #e1e8ed;
    border-radius: 6px;
    font-size: 14px;
    min-width: 150px;
}

#clearFiltersBtn {
    padding: 10px 16px;
    background: var(--color-black-500);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s;
}

#clearFiltersBtn:hover {
    background: var(--color-black-900);
}

/* Results section */
.results-section {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e1e8ed;
}

.results-left {
    display: flex;
    align-items: center;
}

#resultsCount {
    font-weight: 600;
    color: var(--color-black-900);
}

/* View toggle buttons */
.view-toggle {
    display: flex;
    gap: 0;
    border: 1px solid #e1e8ed;
    border-radius: 6px;
    overflow: hidden;
}

.view-btn {
    padding: 8px 16px;
    background: white;
    color: #7f8c8d;
    border: none;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
    border-right: 1px solid #e1e8ed;
}

.view-btn:last-child {
    border-right: none;
}

.view-btn:hover {
    background: #f8f9fa;
    color: #2c3e50;
}

.view-btn.active {
    background: var(--color-green-900);
    color: white;
}

.view-btn.active:hover {
    background: var(--color-green-500);
}

/* Attendees grid */
.attendees-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.attendee-card {
    background: white;
    border: 1px solid #e1e8ed;
    border-radius: 8px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

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

.attendee-photo {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 15px;
    border: 3px solid #e1e8ed;
}

.attendee-initials {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: var(--color-green-900);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    font-weight: bold;
    margin-bottom: 15px;
}

.attendee-name {
    font-size: 18px;
    font-weight: 600;
    color: var(--color-black-900);
    margin-bottom: 5px;
}

.attendee-title {
    font-size: 14px;
    color: var(--color-black-500);
    margin-bottom: 10px;
    min-height: 40px;
}

.attendee-company {
    font-size: 13px;
    color: var(--color-green-900);
    font-weight: 500;
}

/* Table view styles */
.attendees-table {
    width: 100%;
    overflow-x: auto;
}

#attendeeTableEl {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

#attendeeTableEl thead {
    background: #f8f9fa;
    border-bottom: 2px solid #e1e8ed;
}

#attendeeTableEl th {
    padding: 15px 12px;
    text-align: left;
    font-weight: 600;
    color: var(--color-black-900);
    font-size: 14px;
    position: relative;
    user-select: none;
}

#attendeeTableEl th.sortable {
    cursor: pointer;
    transition: background 0.3s;
}

#attendeeTableEl th.sortable:hover {
    background: #e9ecef;
}

.sort-arrow {
    display: inline-block;
    margin-left: 8px;
    font-size: 10px;
    opacity: 0.5;
    transition: opacity 0.3s;
}

.sort-arrow:before {
    content: "↕";
}

.sort-arrow.asc {
    opacity: 1;
}

.sort-arrow.asc:before {
    content: "↑";
}

.sort-arrow.desc {
    opacity: 1;
}

.sort-arrow.desc:before {
    content: "↓";
}

#attendeeTableEl tbody tr {
    border-bottom: 1px solid #f1f3f4;
    transition: background 0.3s;
}

#attendeeTableEl tbody tr:hover {
    background: #f8f9fa;
    cursor: pointer;
}

#attendeeTableEl tbody tr:last-child {
    border-bottom: none;
}

#attendeeTableEl td {
    padding: 12px;
    vertical-align: middle;
    font-size: 14px;
}

.photo-cell {
    width: 120px;
    text-align: center;
}

.table-photo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #e1e8ed;
}

.table-initials {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--color-green-900);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: bold;
    margin: 0 auto;
}

.name-cell {
    font-weight: 600;
    color: var(--color-black-900);
    min-width: 150px;
}

.title-cell {
    color: var(--color-black-500);
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.company-cell {
    color: var(--color-green-900);
    font-weight: 500;
    min-width: 120px;
}

.location-cell {
    color: #555;
    min-width: 100px;
}

.email-cell {
    color: #2980b9;
    min-width: 180px;
    max-width: 250px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.email-cell a {
    color: #2980b9;
    text-decoration: none;
}

.email-cell a:hover {
    text-decoration: underline;
}

.cell-number-cell {
    color: #27ae60;
    min-width: 120px;
}

.cell-number-cell a {
    color: #27ae60;
    text-decoration: none;
}

.cell-number-cell a:hover {
    text-decoration: underline;
}

.sector-cell {
    color: #8e44ad;
    min-width: 100px;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sub-sector-cell {
    color: #9b59b6;
    min-width: 120px;
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Loading and no results */
.loading, .no-results {
    text-align: center;
    padding: 40px;
    color: #7f8c8d;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--color-green-900);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Modal */
.modal {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    position: relative;
}

.close {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: #7f8c8d;
}

.close:hover {
    color: #2c3e50;
}

.attendee-detail {
    padding: 30px;
}

.detail-photo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 20px;
    display: block;
    border: 4px solid #e1e8ed;
}

.detail-initials {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: var(--color-green-900);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    font-weight: bold;
    margin: 0 auto 20px;
}

.detail-name {
    font-size: 24px;
    font-weight: 600;
    color: var(--color-black-900);
    text-align: center;
    margin-bottom: 20px;
}

.detail-info {
    margin-bottom: 15px;
}

.detail-label {
    font-weight: 600;
    color: var(--color-black-900);
    margin-bottom: 5px;
}

.detail-value {
    color: #555;
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }

    .search-bar {
        flex-direction: column;
    }

    .filters {
        flex-direction: column;
        gap: 10px;
    }

    .filters select {
        min-width: auto;
        width: 100%;
    }

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

    .attendee-card {
        padding: 15px;
    }

    /* Results header responsive */
    .results-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }

    .results-left {
        width: 100%;
    }

    .view-toggle {
        width: 100%;
    }

    .view-btn {
        flex: 1;
        text-align: center;
    }

    /* Table responsive - horizontal scroll on mobile */
    .attendees-table {
        font-size: 12px;
        overflow-x: auto;
    }

    #attendeeTableEl {
        min-width: 1000px;
    }

    #attendeeTableEl th,
    #attendeeTableEl td {
        padding: 8px 4px;
    }

    .photo-cell {
        width: 50px;
    }

    .table-photo,
    .table-initials {
        width: 30px;
        height: 30px;
    }

    .table-initials {
        font-size: 12px;
    }

    .name-cell {
        min-width: 120px;
    }

    .title-cell {
        max-width: 150px;
    }

    .company-cell {
        min-width: 100px;
    }

    .location-cell {
        min-width: 80px;
    }

    .email-cell {
        min-width: 140px;
        max-width: 180px;
    }

    .cell-number-cell {
        min-width: 100px;
    }

    .sector-cell {
        min-width: 80px;
        max-width: 120px;
    }

    .sub-sector-cell {
        min-width: 100px;
        max-width: 140px;
    }

    /* Horizontal scroll hint for table */
    .attendees-table::after {
        content: "← Scroll horizontally to see all columns →";
        display: block;
        text-align: center;
        font-size: 12px;
        color: #7f8c8d;
        padding: 10px;
        background: #f8f9fa;
        border-top: 1px solid #e1e8ed;
    }
}