/**
 * IV WEST HUB - STYLES
 * Haystack-inspired modern design
 */

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

:root {
    --primary-blue: #3b82f6;
    --dark-blue: #1e40af;
    --amber: #f59e0b;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-900: #111827;
    --dark: #0f172a;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    background: var(--gray-50);
    color: var(--gray-900);
    line-height: 1.6;
}

/* Header */
.header {
    background: white;
    border-bottom: 1px solid var(--gray-200);
    padding: 20px 40px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 20px;
    font-weight: 700;
    color: var(--dark);
}

.nav-links {
    display: flex;
    gap: 30px;
    align-items: center;
}

.nav-link {
    color: var(--gray-600);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-link:hover, .nav-link.active {
    color: var(--dark);
}

.nav-link-mobile {
    display: none;
    font-size: 24px;
    cursor: pointer;
}

.mobile-menu {
    display: none;
    background: white;
    border-bottom: 1px solid var(--gray-200);
}

.mobile-menu a {
    display: block;
    padding: 15px 40px;
    color: var(--gray-700);
    text-decoration: none;
    border-bottom: 1px solid var(--gray-100);
}

/* Hero */
.hero {
    background: linear-gradient(135deg, var(--dark-blue) 0%, var(--primary-blue) 100%);
    color: white;
    padding: 80px 40px;
    text-align: center;
}

.hero-content {
    max-width: 900px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 48px;
    font-weight: 800;
    margin-bottom: 20px;
}

.hero p {
    font-size: 20px;
    margin-bottom: 35px;
}

.hero-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-btn {
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
}

.hero-btn-primary {
    background: white;
    color: var(--dark-blue);
}

.hero-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

.hero-btn-secondary {
    background: rgba(255,255,255,0.2);
    color: white;
    border: 2px solid white;
}

/* Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 60px 40px;
}

.section-title {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--primary-blue);
    margin-bottom: 15px;
}

.section-heading {
    font-size: 42px;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 50px;
}

/* Stats */
.stats-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-bottom: 60px;
}

.stat-card {
    background: white;
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    border: 1px solid var(--gray-200);
    transition: all 0.3s;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.stat-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.stat-value {
    font-size: 36px;
    font-weight: 800;
    color: var(--primary-blue);
    margin-bottom: 8px;
}

.stat-label {
    font-size: 14px;
    color: var(--gray-600);
    font-weight: 500;
}

/* Search */
.search-section {
    background: white;
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 50px;
    border: 1px solid var(--gray-200);
}

.search-section h2 {
    font-size: 24px;
    margin-bottom: 20px;
}

.search-box {
    display: flex;
    gap: 12px;
}

.search-input {
    flex: 1;
    padding: 12px 20px;
    border: 2px solid var(--gray-200);
    border-radius: 8px;
    font-size: 16px;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-blue);
}

.search-button {
    padding: 12px 32px;
    background: var(--primary-blue);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
}

.search-button:hover {
    background: var(--dark-blue);
}

/* Cards */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

.card {
    background: white;
    border-radius: 12px;
    padding: 40px;
    transition: all 0.3s;
    border: 1px solid var(--gray-200);
    cursor: pointer;
}

.card:hover {
    box-shadow: 0 20px 40px rgba(0,0,0,0.08);
    transform: translateY(-5px);
    border-color: var(--primary-blue);
}

.card-icon {
    font-size: 48px;
    margin-bottom: 20px;
}

.card h3 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 15px;
}

.card ul {
    list-style: none;
    margin-bottom: 20px;
}

.card li {
    padding: 10px 0;
    color: var(--gray-600);
    display: flex;
    align-items: center;
    gap: 10px;
}

.card li::before {
    content: '→';
    color: var(--primary-blue);
    font-weight: bold;
}

.card-btn {
    background: var(--gray-100);
    color: var(--primary-blue);
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-weight: 600;
    width: 100%;
    cursor: pointer;
}

.card:hover .card-btn {
    background: var(--primary-blue);
    color: white;
}

/* Quick Access */
.quick-access {
    background: white;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 50px;
    border: 1px solid var(--gray-200);
}

.quick-access h3 {
    font-size: 20px;
    margin-bottom: 20px;
}

.quick-links {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.quick-link {
    background: var(--gray-100);
    color: var(--dark);
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s;
}

.quick-link:hover {
    background: var(--primary-blue);
    color: white;
}

/* Events */
.upcoming-events h2 {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 30px;
}

.events-preview {
    display: grid;
    gap: 20px;
    margin-bottom: 20px;
}

.event-card {
    background: white;
    border-radius: 10px;
    padding: 30px;
    border-left: 4px solid var(--amber);
}

.event-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 10px;
}

.event-title {
    font-size: 20px;
    font-weight: 700;
}

.event-badge {
    background: var(--amber);
    color: white;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 700;
}

.event-description {
    color: var(--gray-600);
}

/* Footer CTA */
.footer-cta {
    background: var(--dark);
    color: white;
    border-radius: 12px;
    padding: 60px 50px;
    text-align: center;
    margin-bottom: 60px;
}

.footer-cta h2 {
    font-size: 36px;
    margin-bottom: 15px;
}

.footer-cta p {
    font-size: 18px;
    opacity: 0.85;
    margin-bottom: 30px;
}

/* Footer */
.footer {
    background: var(--gray-900);
    color: var(--gray-600);
    padding: 30px;
    text-align: center;
}

/* Utilities */
.loading {
    text-align: center;
    padding: 30px;
    color: var(--gray-600);
}

.view-all-link {
    color: var(--primary-blue);
    font-weight: 600;
    text-decoration: none;
}

/* Mobile */
@media (max-width: 768px) {
    .nav-links .nav-link {
        display: none;
    }
    .nav-link-mobile {
        display: block;
    }
    .hero h1 {
        font-size: 32px;
    }
    .section-heading {
        font-size: 32px;
    }
    .cards-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================ */
/* COMPACT PROFESSIONAL OVERRIDES */
/* ============================================ */

/* Reduce overall spacing */
body {
    font-size: 14px;
    line-height: 1.5;
}

/* Tighter header */
.header {
    padding: 12px 20px;
}

.nav-container {
    padding: 0;
    gap: 20px;
}

.logo {
    gap: 8px;
}

.logo-icon {
    font-size: 20px;
}

.logo-text {
    font-size: 15px;
    font-weight: 600;
}

.nav-links {
    gap: 4px;
}

.nav-link {
    padding: 8px 12px;
    font-size: 13px;
}

/* Compact cards */
.card, .contact-card {
    transition: all 0.2s ease;
}

.card:hover, .contact-card:hover {
    transform: translateY(-2px);
}

/* Tighter table rows */
tbody tr {
    height: 36px;
}

/* More compact form elements */
input, button, select {
    font-size: 13px;
}

/* Reduce material icons size */
.material-icons {
    font-size: 18px !important;
}

/* Tighter scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

/* ============================================ */
/* IMPROVED SEARCH RESULTS */
/* ============================================ */

/* Loading spinner for search */
.loading-search {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 32px;
    color: #666;
    font-size: 14px;
}

.spinner-search {
    width: 24px;
    height: 24px;
    border: 3px solid #e0e0e0;
    border-top-color: #667eea;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Numbered search results */
.search-result-item.numbered {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    border-bottom: 1px solid #e8e8e8;
    transition: background-color 0.2s;
}

.search-result-item.numbered:hover {
    background-color: #f8f9fa;
}

.search-result-item.numbered:last-child {
    border-bottom: none;
}

.result-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    background: #667eea;
    color: white;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 600;
    flex-shrink: 0;
    margin-top: 2px;
}

.result-content {
    flex: 1;
}

.result-content strong {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
}

.result-content a {
    color: #667eea;
    text-decoration: none;
    transition: color 0.2s;
}

.result-content a:hover {
    color: #5568d3;
    text-decoration: underline;
}

.result-meta {
    font-size: 13px;
    color: #666;
    margin-top: 4px;
    line-height: 1.4;
}

.search-result-section {
    margin-bottom: 24px;
}

.search-result-section h4 {
    font-size: 15px;
    font-weight: 600;
    color: #333;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e0e0e0;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: #999;
}

.empty-state .material-icons {
    font-size: 48px !important;
    margin-bottom: 12px;
    opacity: 0.5;
}
