/* Academia Transistors - Frontend Styles */

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

/* Breadcrumbs */
.act-breadcrumbs {
    font-size: 0.85em;
    margin-bottom: 20px;
    color: #666;
}
.act-breadcrumbs a {
    color: #0073aa;
    text-decoration: none;
}
.act-breadcrumbs a:hover {
    text-decoration: underline;
}
.act-breadcrumbs .sep {
    margin: 0 6px;
    color: #999;
}

/* Header */
.act-header {
    margin-bottom: 30px;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 15px;
}
.act-title {
    font-size: 2em;
    margin: 0 0 10px;
    color: #1a1a1a;
}
.act-subtitle {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* Badges */
.act-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.85em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.act-badge-bjt {
    background: #e3f2fd;
    color: #1565c0;
}
.act-badge-mosfet {
    background: #e8f5e9;
    color: #2e7d32;
}
.act-badge-polarity {
    background: #fff3e0;
    color: #e65100;
}
.act-badge-package {
    background: #f3e5f5;
    color: #7b1fa2;
}
.act-badge-sm {
    padding: 2px 8px;
    font-size: 0.75em;
}

/* Key Parameters Grid */
.act-key-params {
    margin-bottom: 30px;
}
.act-key-params h2 {
    font-size: 1.4em;
    margin-bottom: 15px;
    color: #333;
}
.act-params-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
}
.act-param-card {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
}
.act-param-label {
    display: block;
    font-size: 0.8em;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
}
.act-param-value {
    display: block;
    font-size: 1.4em;
    font-weight: 700;
    color: #1a1a1a;
}

/* Parameters Table */
.act-full-params {
    margin-bottom: 30px;
}
.act-full-params h2 {
    font-size: 1.4em;
    margin-bottom: 15px;
}
.act-params-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}
.act-params-table th,
.act-params-table td {
    padding: 10px 15px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}
.act-params-table thead th {
    background: #f0f0f0;
    font-weight: 600;
    font-size: 0.9em;
    text-transform: uppercase;
}
.act-params-table tbody tr:hover {
    background: #f8f9fa;
}
.act-param-name {
    font-weight: 500;
    color: #333;
    width: 60%;
}
.act-param-val {
    color: #1a1a1a;
    font-weight: 600;
}
.act-params-table.act-compact td {
    padding: 6px 12px;
}

/* Equivalents Grid */
.act-equivalents {
    margin-bottom: 30px;
}
.act-equivalents h2 {
    font-size: 1.4em;
    margin-bottom: 10px;
}
.act-equiv-intro {
    color: #555;
    margin-bottom: 15px;
}
.act-equiv-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
}
.act-equiv-card {
    display: flex;
    flex-direction: column;
    padding: 12px;
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.act-equiv-card:hover {
    border-color: #0073aa;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    text-decoration: none;
}
.act-equiv-name {
    font-weight: 600;
    font-size: 1em;
    color: #0073aa;
    margin-bottom: 4px;
}
.act-equiv-meta {
    display: flex;
    gap: 4px;
}

/* FAQ */
.act-faq {
    margin-bottom: 30px;
    border-top: 2px solid #e0e0e0;
    padding-top: 20px;
}
.act-faq h2 {
    font-size: 1.4em;
    margin-bottom: 15px;
}
.act-faq-item {
    margin-bottom: 20px;
}
.act-faq-item h3 {
    font-size: 1.1em;
    margin-bottom: 5px;
    color: #333;
}
.act-faq-item p {
    color: #555;
    line-height: 1.6;
}
.act-faq-item a {
    color: #0073aa;
    text-decoration: none;
}
.act-faq-item a:hover {
    text-decoration: underline;
}

/* Archive Styles */
.act-archive-header {
    margin-bottom: 20px;
}
.act-archive-header h1 {
    font-size: 1.8em;
    margin-bottom: 5px;
}
.act-archive-count {
    color: #666;
    font-size: 0.95em;
}
.act-archive-count a {
    color: #0073aa;
    text-decoration: none;
}

/* Filters */
.act-filters {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 25px;
}
.act-filter-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}
.act-filter-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}
.act-filter-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 150px;
    flex: 1;
}
.act-filter-group label {
    font-size: 0.8em;
    font-weight: 600;
    text-transform: uppercase;
    color: #555;
}
.act-filter-group input,
.act-filter-group select {
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 0.95em;
}
.act-filter-group.act-range {
    flex-direction: row;
    align-items: flex-end;
    gap: 6px;
    flex-wrap: wrap;
}
.act-filter-group.act-range label {
    width: 100%;
}
.act-filter-group.act-range input {
    width: 80px;
    flex: 1;
}
.act-filter-group.act-range span {
    line-height: 36px;
    color: #999;
}
.act-filter-actions {
    display: flex;
    gap: 10px;
}

/* Buttons */
.act-btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 4px;
    font-size: 0.95em;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: background 0.2s;
}
.act-btn-primary {
    background: #0073aa;
    color: #fff;
}
.act-btn-primary:hover {
    background: #005177;
    color: #fff;
}
.act-btn-secondary {
    background: #e0e0e0;
    color: #333;
}
.act-btn-secondary:hover {
    background: #ccc;
    color: #333;
}

/* Results Table */
.act-table-wrapper {
    overflow-x: auto;
}
.act-results-table {
    width: 100%;
    border-collapse: collapse;
}
.act-results-table th,
.act-results-table td {
    padding: 8px 12px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
    white-space: nowrap;
}
.act-results-table thead th {
    background: #f0f0f0;
    font-weight: 600;
    font-size: 0.85em;
    text-transform: uppercase;
    position: sticky;
    top: 0;
}
.act-results-table tbody tr:hover {
    background: #f0f7ff;
}
.act-link {
    color: #0073aa;
    text-decoration: none;
    font-weight: 600;
}
.act-link:hover {
    text-decoration: underline;
}
.act-no-results {
    text-align: center;
    padding: 40px;
    color: #666;
    font-size: 1.1em;
}

/* Pagination */
.act-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin-top: 25px;
    flex-wrap: wrap;
}
.act-page-link {
    display: inline-block;
    padding: 8px 14px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    color: #0073aa;
    font-weight: 500;
}
.act-page-link:hover {
    background: #0073aa;
    color: #fff;
    border-color: #0073aa;
}
.act-page-current {
    background: #0073aa;
    color: #fff;
    border-color: #0073aa;
}
.act-page-info {
    margin-left: 10px;
    color: #666;
    font-size: 0.9em;
}

/* Compatibility Page */
.act-compatibility h1 {
    font-size: 1.8em;
    margin-bottom: 5px;
}
.act-compat-form {
    margin: 25px 0;
    position: relative;
}
.act-compat-search {
    display: flex;
    gap: 10px;
}
.act-compat-input {
    flex: 1;
    padding: 12px 16px;
    font-size: 1.1em;
    border: 2px solid #ddd;
    border-radius: 6px;
}
.act-compat-input:focus {
    border-color: #0073aa;
    outline: none;
}

/* Autocomplete */
.act-autocomplete-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: 300px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 0 0 6px 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 1000;
    display: none;
}
.act-autocomplete-results.active {
    display: block;
}
.act-autocomplete-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 16px;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}
.act-autocomplete-item:hover {
    background: #f0f7ff;
}

.act-compat-source {
    margin-bottom: 25px;
}

/* Responsive */
@media (max-width: 768px) {
    .act-primary {
        padding: 10px;
    }
    .act-title {
        font-size: 1.5em;
    }
    .act-params-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .act-equiv-grid {
        grid-template-columns: 1fr;
    }
    .act-filter-row {
        flex-direction: column;
    }
    .act-filter-group {
        min-width: 100%;
    }
    .act-compat-search {
        flex-direction: column;
    }
    .act-pagination {
        gap: 4px;
    }
    .act-page-link {
        padding: 6px 10px;
        font-size: 0.9em;
    }
}
