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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #374151;
    background: linear-gradient(135deg, #dbeafe 0%, #ffffff 50%, #dbeafe 100%);
    min-height: 100vh;
}

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

/* Utility Classes */
.hidden {
    display: none !important;
}

/* Header Styles */
.header {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid #e5e7eb;
    position: sticky;
    top: 0;
    z-index: 50;
}

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

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

.logo-icon {
    width: 2rem;
    height: 2rem;
    color: #2563eb;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
}

.header-buttons {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Button Styles */
.btn {
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.btn-primary {
    background-color: #2563eb;
    color: white;
}

.btn-primary:hover {
    background-color: #1d4ed8;
}

.btn-outline {
    background-color: white;
    color: #374151;
    border: 1px solid #d1d5db;
}

.btn-outline:hover {
    background-color: #f9fafb;
}

.btn-sm {
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
}

.btn-lg {
    padding: 0.75rem 2rem;
    font-size: 1.125rem;
}

.btn-icon {
    margin-left: 0.5rem;
    width: 1.25rem;
    height: 1.25rem;
}

/* Main Section */
.main-section {
    padding: 4rem 1rem;
}

/* Title Section */
.title-section {
    text-align: center;
    margin-bottom: 3rem;
}

.main-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 1rem;
}

.title-highlight {
    color: #2563eb;
}

.main-subtitle {
    font-size: 1.25rem;
    color: #6b7280;
    max-width: 48rem;
    margin: 0 auto;
}

/* Filter Panel */
.filter-panel {
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

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

.filter-icon {
    width: 1.25rem;
    height: 1.25rem;
    color: #6b7280;
}

.filter-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #111827;
    flex: 1;
}

/* Search Container */
.search-container {
    position: relative;
    margin-bottom: 1rem;
}

.search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    width: 1rem;
    height: 1rem;
    color: #9ca3af;
}

.search-input {
    width: 100%;
    padding: 0.5rem 0.5rem 0.5rem 2.5rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.search-input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Filter Grid */
.filter-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width: 768px) {
    .filter-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .filter-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.filter-item {
    position: relative;
}

.filter-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
}

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

.dropdown-button {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    background: white;
    text-align: left;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.dropdown-button:hover {
    border-color: #9ca3af;
}

.dropdown-button:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.dropdown-arrow {
    width: 1rem;
    height: 1rem;
    color: #6b7280;
}

.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    max-height: 200px;
    overflow-y: auto;
    margin-top: 0.25rem;
}

.dropdown-content.show {
    display: block;
}

.dropdown-item {
    padding: 0.5rem 1rem;
    cursor: pointer;
    font-size: 0.875rem;
    transition: background-color 0.2s ease;
}

.dropdown-item:first-child {
    border-top-left-radius: 0.5rem;
    border-top-right-radius: 0.5rem;
}

.dropdown-item:last-child {
    border-bottom-left-radius: 0.5rem;
    border-bottom-right-radius: 0.5rem;
}

/* Results Summary */
.results-summary {
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

.results-text {
    color: #000;
}

.results-count {
    font-weight: 600;
    color: #111827;
}

/* Cards Grid */
.cards-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    max-width: 90rem;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .cards-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Company Card */
.company-card {
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    overflow: hidden;
}

.company-card:hover {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

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

.card-badge-container {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.theme-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
}

/* Theme Badge Colors */
.theme-pangan { background-color: #dcfce7; color: #166534; }
.theme-energi { background-color: #fef3c7; color: #92400e; }
.theme-kesehatan { background-color: #fecaca; color: #991b1b; }
.theme-material { background-color: #dbeafe; color: #1e40af; }
.theme-maritim { background-color: #cffafe; color: #155e75; }
.theme-pertahanan { background-color: #f3f4f6; color: #374151; }
.theme-hilirisasi { background-color: #e9d5ff; color: #7c2d12; }
.theme-digitalisasi { background-color: #e0e7ff; color: #3730a3; }

.company-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.company-avatar {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    background-color: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
    color: #6b7280;
}

.company-name {
    font-size: 1.125rem;
    font-weight: 700;
    color: #111827;
    line-height: 1.25;
}

.company-description {
    color: #6b7280;
    font-size: 0.875rem;
    line-height: 1.5;
    margin-bottom: 1rem;
}

.card-content {
    padding: 0 1.5rem 1.5rem;
}

.schedule-info {
    margin-bottom: 1rem;
}

.schedule-item {
    display: flex;
    align-items: center;
    color: #374151;
    margin-bottom: 0.75rem;
}

.schedule-icon {
    width: 1rem;
    height: 1rem;
    margin-right: 0.75rem;
}

.schedule-icon.calendar { color: #2563eb; }
.schedule-icon.clock { color: #059669; }
.schedule-icon.map-pin { color: #7c3aed; }

.schedule-text {
    font-size: 0.875rem;
}

.schedule-main {
    font-weight: 600;
}

.schedule-sub {
    color: #6b7280;
    margin-left: 0.25rem;
}

.card-actions {
    display: flex;
    gap: 0.75rem;
    padding-top: 0.5rem;
}

.card-actions .btn {
    flex: 1;
}

.card-actions .btn:last-child {
    flex: none;
}

/* No Results */
.no-results {
    text-align: center;
    padding: 3rem 0;
}

.no-results-content {
    max-width: 28rem;
    margin: 0 auto;
}

.no-results-icon {
    width: 4rem;
    height: 4rem;
    color: #d1d5db;
    margin: 0 auto 1rem;
}

.no-results-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 0.5rem;
}

.no-results-text {
    color: #6b7280;
    margin-bottom: 1rem;
}

/* Load More */
.load-more {
    text-align: center;
    margin-top: 3rem;
}

/* Responsive Design */
@media (max-width: 767px) {
    .main-title {
        font-size: 2rem;
    }
    
    .main-subtitle {
        font-size: 1.125rem;
    }
    
    .header-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .header-buttons {
        width: 100%;
        justify-content: center;
    }
    
    .filter-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .filter-header .btn {
        align-self: flex-end;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 0.5rem;
    }
    
    .main-section {
        padding: 2rem 0.5rem;
    }
    
    .filter-panel {
        padding: 1rem;
    }
    
    .company-info {
        flex-direction: column;
        text-align: center;
    }
    
    .card-actions {
        flex-direction: column;
    }
    
    .card-actions .btn:last-child {
        flex: 1;
    }
}

/* Scrollbar Styling */
.dropdown-content::-webkit-scrollbar {
    width: 6px;
}

.dropdown-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.dropdown-content::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.dropdown-content::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Animation for cards */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.company-card {
    animation: fadeInUp 0.3s ease-out;
}

/* Focus styles for accessibility */
.btn:focus,
.search-input:focus,
.dropdown-button:focus {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .header,
    .filter-panel,
    .load-more {
        display: none;
    }
    
    .company-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #e5e7eb;
    }
}