/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #1e6bb8;
    --primary-dark: #155a99;
    --secondary-color: #475569;
    --accent-color: #0ea5e9;
    --bg-light: #f8fafc;
    --bg-white: #ffffff;
    --text-dark: #1e293b;
    --text-gray: #64748b;
    --border-color: #e2e8f0;
    --success-color: #10b981;
    --hover-bg: #f1f5f9;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-light);
}

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

/* Header */
.header {
    background-color: var(--bg-white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 0;
}

.logo {
    display: flex;
    align-items: center;
}

.logo-img {
    height: 45px;
    width: auto;
    object-fit: contain;
}

.header-title {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0;
}

/* Hero Section */
.hero {
    background: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.3)), url('https://page.gensparksite.com/v1/base64_upload/a555de0425e24fbe28fa8e8c787d74a4');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: white;
    padding: 5rem 0 6rem;
    text-align: center;
    position: relative;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7);
    letter-spacing: -0.02em;
    background: rgba(0, 0, 0, 0.4);
    display: inline-block;
    padding: 1rem 2rem;
    border-radius: 8px;
    backdrop-filter: blur(10px);
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 3rem;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.5);
    opacity: 0.95;
    font-weight: 400;
}

/* Search Container */
.search-container {
    max-width: 600px;
    margin: 0 auto 4rem;
}

.search-box {
    display: flex;
    background-color: var(--bg-white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.search-box input {
    flex: 1;
    border: none;
    padding: 1rem 1.5rem;
    font-size: 1rem;
    outline: none;
    color: var(--text-dark);
}

.search-box input::placeholder {
    color: var(--text-gray);
}

.search-btn {
    background-color: #475569;
    color: white;
    border: none;
    padding: 1rem 2rem;
    font-size: 1.125rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.search-btn:hover {
    background-color: #334155;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
    white-space: nowrap;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
}

.btn-secondary {
    background-color: var(--bg-white);
    color: var(--text-dark);
    border: 1px solid var(--border-color);
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.btn-secondary:hover {
    background-color: var(--bg-light);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* Stats Container */
.stats-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    max-width: 900px;
    margin: 0 auto;
}

.stat-card {
    background-color: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 12px;
    padding: 2rem 1.5rem;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.stat-card i {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: white;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0.5rem 0;
    color: white;
}

.stat-label {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Categories Section */
.categories-section {
    padding: 4rem 0;
    background-color: var(--bg-white);
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.category-card {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border-radius: 0.75rem;
    padding: 2rem 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
    color: white;
    position: relative;
    overflow: hidden;
}

.category-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    transition: transform 0.5s ease;
}

.category-card:hover::before {
    transform: translate(-25%, -25%);
}

.category-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
}

.category-card.suppliers {
    background: linear-gradient(135deg, #10b981, #059669);
}

.category-card.service-providers {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.category-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.9;
}

.category-name {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.category-description {
    font-size: 0.875rem;
    opacity: 0.95;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.category-count {
    font-size: 2rem;
    font-weight: 700;
    margin-top: 0.75rem;
}

.category-count-label {
    font-size: 0.75rem;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Companies Section */
.companies-section {
    padding: 4rem 0;
    background-color: var(--bg-light);
}

.section-title {
    text-align: center;
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.section-subtitle {
    text-align: center;
    color: var(--text-gray);
    margin-bottom: 3rem;
}

/* Company Grid */
.company-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

/* Category Divider */
.category-divider {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 2rem 0 1rem 0;
}

.divider-line {
    flex: 1;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
}

.divider-text {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 0 1rem;
    white-space: nowrap;
}

.company-card {
    background-color: var(--bg-white);
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.company-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
    border-color: var(--primary-color);
}

.company-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.company-logo-icon {
    background: white;
    border: 2px solid var(--border-color);
    padding: 0.5rem;
}

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

.company-name {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.company-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--text-gray);
    font-size: 0.875rem;
}

.company-meta i {
    color: var(--primary-color);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    overflow-y: auto;
    padding: 2rem;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: var(--bg-white);
    border-radius: 1rem;
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    background-color: var(--bg-white);
    z-index: 10;
}

.modal-header h3 {
    font-size: 1.5rem;
    color: var(--text-dark);
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-gray);
    cursor: pointer;
    padding: 0.5rem;
    line-height: 1;
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: var(--text-dark);
}

.modal-body {
    padding: 1.5rem;
}

/* Vendors List */
.vendors-list {
    display: grid;
    gap: 1rem;
}

.vendor-card {
    background-color: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.vendor-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.vendor-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.vendor-avatar {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
    font-weight: 600;
}

.vendor-info h4 {
    font-size: 1.125rem;
    color: var(--text-dark);
    margin-bottom: 0.25rem;
}

.vendor-company {
    color: var(--text-gray);
    font-size: 0.875rem;
}

.vendor-contacts {
    display: grid;
    gap: 0.75rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background-color: var(--bg-light);
    border-radius: 0.5rem;
    transition: background-color 0.3s ease;
}

.contact-item:hover {
    background-color: var(--hover-bg);
}

.contact-icon {
    width: 40px;
    height: 40px;
    background-color: var(--bg-white);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 1rem;
}

.contact-details {
    flex: 1;
}

.contact-label {
    font-size: 0.75rem;
    color: var(--text-gray);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
}

.contact-value {
    color: var(--text-dark);
    font-weight: 500;
}

.contact-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.contact-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* Search Results Section */
.search-results-section {
    padding: 4rem 0;
    background-color: var(--bg-light);
}

/* Footer */
.footer {
    background-color: var(--text-dark);
    color: white;
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    margin-bottom: 1rem;
    font-size: 1.125rem;
}

.footer-section p {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.8;
}

.footer-section a {
    display: block;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    margin-bottom: 0.5rem;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-title {
        font-size: 1.25rem;
    }

    .hero {
        padding: 3rem 0 4rem;
    }

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

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

    .search-container {
        padding: 0 1rem;
    }

    .stats-container {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .stat-card {
        padding: 1.5rem 1rem;
    }

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

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

    .modal {
        padding: 1rem;
    }

    .modal-content {
        max-height: 95vh;
    }
}

@media (max-width: 480px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .hero {
        padding: 2.5rem 0 3.5rem;
    }

    .hero-title {
        font-size: 1.75rem;
    }

    .hero-subtitle {
        font-size: 0.95rem;
    }

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

    .section-title {
        font-size: 1.5rem;
    }
}

/* Loading Animation */
.loading {
    text-align: center;
    padding: 2rem;
    color: var(--text-gray);
}

.loading i {
    font-size: 2rem;
    animation: spin 1s linear infinite;
}

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

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-gray);
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state p {
    font-size: 1.125rem;
}
