/* Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Playfair+Display:wght@600;700&display=swap');

:root {
    --gh2-primary: #0a4d44;
    /* Deep Green */
    --gh2-accent: #2e8b57;
    /* Sea Green */
    --gh2-highlight: #e0f2f1;
    /* Light Mint */
    --gh2-text: #1f2937;
    /* Dark Grey */
    --gh2-text-light: #6b7280;
    /* Light Grey */
    --gh2-border: #e5e7eb;
    --gh2-bg-light: #f9fafb;
    --gh2-white: #ffffff;
    --plugin-radius: 12px;
    --plugin-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --plugin-shadow-hover: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.03);
}

.gh2-wrapper {
    font-family: 'Inter', sans-serif;
    color: var(--gh2-text);
    line-height: 1.6;
    background-color: var(--gh2-white);
    padding: 2rem 0;
}

.gh2-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Header */
.gh2-header {
    text-align: center;
    margin-bottom: 3rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.gh2-header h2 {
    font-family: 'Montserrat, sans-serif';
    font-size: 2.5rem;
    color: var(--gh2-primary);
    margin-bottom: 1rem;
    font-weight: 700;
}

.gh2-header p {
    font-size: 1.125rem;
    color: var(--gh2-text-light);
}

/* Layout */
.gh2-layout {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

@media (min-width: 992px) {
    .gh2-layout {
        flex-direction: row-reverse;
    }
}

.gh2-main {
    flex: 1;
}

.gh2-sidebar {
    width: 100%;
}

@media (min-width: 992px) {
    .gh2-sidebar {
        width: 300px;
        flex-shrink: 0;
    }
}


/* Search */
.gh2-search-container {
    position: relative;
    margin-bottom: 2.5rem;
}

.gh2-search-container input {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    border: 1px solid var(--gh2-border);
    border-radius: var(--plugin-radius);
    font-size: 1rem;
    transition: all 0.3s ease;
    background-color: var(--gh2-bg-light);
}

.gh2-search-container input:focus {
    outline: none;
    border-color: var(--gh2-accent);
    background-color: var(--gh2-white);
    box-shadow: 0 0 0 3px rgba(46, 139, 87, 0.1);
}

.gh2-icon-search {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%239ca3af'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
}

/* Search Clear Button */
.gh2-search-clear {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    border: none;
    background: var(--gh2-border);
    border-radius: 50%;
    font-size: 1.25rem;
    line-height: 1;
    color: var(--gh2-text-light);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.gh2-search-clear:hover {
    background: var(--gh2-accent);
    color: white;
}

/* Search Results Count */
.gh2-search-results-count {
    margin-bottom: 1rem;
    padding: 0.5rem 0;
    font-size: 0.875rem;
    color: var(--gh2-text-light);
}

.gh2-search-results-count span {
    background: var(--gh2-highlight);
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    color: var(--gh2-primary);
    font-weight: 500;
}

/* Clear Search Button in Empty State */
.gh2-clear-search-btn {
    margin-top: 1rem;
    padding: 0.75rem 1.5rem;
    background: var(--gh2-primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.gh2-clear-search-btn:hover {
    background: var(--gh2-accent);
    transform: translateY(-1px);
}

/* Category Sections */
.gh2-category-section {
    margin-bottom: 2.5rem;
}

.gh2-category-title {
    font-size: 1.5rem;
    font-family: 'Playfair Display', serif;
    color: var(--gh2-primary);
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--gh2-highlight);
    padding-bottom: 0.5rem;
    display: inline-block;
}

.gh2-resource-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem;
    background-color: var(--gh2-white);
    border: 1px solid var(--gh2-border);
    border-radius: var(--plugin-radius);
    margin-bottom: 1rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.gh2-resource-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--plugin-shadow-hover);
    border-color: var(--gh2-accent);
}

.gh2-resource-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}
/* Replace old .gh2-file-icon in resource items */
.gh2-file-thumb {
    width: 64px;
    height: 80px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
    background-color: var(--gh2-highlight);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--gh2-border);
}

.gh2-file-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.gh2-file-type-label {
    font-weight: 700;
    font-size: 0.75rem;
    color: var(--gh2-accent);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Excerpt under title */
.gh2-resource-excerpt {
    margin: 0.3rem 0 0.2rem;
    font-size: 0.82rem;
    color: var(--gh2-text-light);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.gh2-resource-meta {
    font-size: 0.8rem;
    color: var(--gh2-text-light);
}
.gh2-resource-details h4 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--gh2-text);
}

.gh2-resource-details span {
    font-size: 0.85rem;
    color: var(--gh2-text-light);
}

.gh2-download-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: var(--gh2-bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.gh2-resource-item:hover .gh2-download-btn {
    background-color: var(--gh2-accent);
    color: white;
}

/* Filters Sidebar */
.gh2-sidebar-inner {
    position: sticky;
    top: 2rem;
    background-color: var(--gh2-bg-light);
    padding: 1.5rem;
    border-radius: var(--plugin-radius);
    border: 1px solid var(--gh2-border);
}

.gh2-filter-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--gh2-text-light);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
}

.gh2-filter-btn {
    display: block;
    width: 100%;
    text-align: left;
    padding: 1rem;
    margin-bottom: 0.5rem;
    background: none;
    border: none;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    color: var(--gh2-text-light);
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
}

.gh2-filter-btn:hover {
    background-color: rgba(0, 0, 0, 0.03);
    color: var(--gh2-primary);
}

.gh2-filter-btn.active {
    background-color: var(--gh2-white);
    color: var(--gh2-primary);
    font-weight: 600;
    box-shadow: var(--plugin-shadow);
    border-left: 3px solid var(--gh2-accent);
}

/* Cards (Forms & Portals) */
.gh2-bottom-sections {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-top: 3rem;
}

@media (min-width: 768px) {
    .gh2-bottom-sections {
        grid-template-columns: 1fr 1fr;
    }
}

.gh2-card {
    background-color: var(--gh2-white);
    border: 1px solid var(--gh2-border);
    border-radius: var(--plugin-radius);
    padding: 2rem;
    transition: all 0.3s ease;
}

.gh2-card:hover {
    box-shadow: var(--plugin-shadow-hover);
}

.gh2-card h3 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: 'Playfair Display', serif;
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    color: var(--gh2-primary);
}

.gh2-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.gh2-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
    border-bottom: 1px solid var(--gh2-border);
}

.gh2-list li:last-child {
    border-bottom: none;
}

.gh2-list-content {
    display: flex;
    flex-direction: column;
}

.gh2-list-title {
    font-weight: 500;
    color: var(--gh2-text);
}

.gh2-badge {
    display: inline-block;
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    margin-top: 0.25rem;
    background-color: var(--gh2-bg-light);
    color: var(--gh2-text-light);
    width: fit-content;
}

.gh2-badge.open {
    background-color: #ecfdf5;
    color: #059669;
}

.gh2-badge.warning {
    background-color: #fffbeb;
    color: #d97706;
}

.gh2-link-icon {
    font-size: 0.85rem;
    color: var(--gh2-accent);
    text-decoration: none;
    font-weight: 500;
}

.gh2-link-icon:hover {
    text-decoration: underline;
}

.gh2-link-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.gh2-link-list li {
    margin-bottom: 0.75rem;
}

.gh2-link-list a {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background-color: var(--gh2-bg-light);
    border-radius: 8px;
    text-decoration: none;
    color: var(--gh2-text);
    font-weight: 500;
    transition: all 0.2s;
}

.gh2-link-list a:hover {
    background-color: var(--gh2-highlight);
    color: var(--gh2-primary);
}

.gh2-portal-icon {
    width: 32px;
    height: 32px;
    background-color: var(--gh2-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--gh2-accent);
}

/* Help Box */
.gh2-help-box {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--gh2-border);
}

.gh2-help-box h4 {
    margin-bottom: 0.5rem;
    color: var(--gh2-text);
}

.gh2-help-box p {
    font-size: 0.9rem;
    color: var(--gh2-text-light);
    margin-bottom: 1rem;
}

.gh2-contact-link {
    color: var(--gh2-primary);
    font-weight: 600;
    text-decoration: none;
    font-size: 0.9rem;
}

.gh2-contact-link:hover {
    text-decoration: underline;
}

/* View Controls */
.gh2-view-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--gh2-border);
}

.gh2-view-btn {
    width: 36px;
    height: 36px;
    border: 1px solid var(--gh2-border);
    background: var(--gh2-white);
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gh2-text-light);
    transition: all 0.2s;
}

.gh2-view-btn:hover {
    border-color: var(--gh2-accent);
    color: var(--gh2-accent);
}

.gh2-view-btn.active {
    background: var(--gh2-primary);
    border-color: var(--gh2-primary);
    color: white;
}

.gh2-sort-control {
    margin-left: auto;
}

.gh2-sort-control select {
    padding: 0.5rem 2rem 0.5rem 0.75rem;
    border: 1px solid var(--gh2-border);
    border-radius: 6px;
    font-size: 0.875rem;
    color: var(--gh2-text);
    background: var(--gh2-white);
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.5rem center;
}

.gh2-sort-control select:focus {
    outline: none;
    border-color: var(--gh2-accent);
}

/* Grid View Mode */
.gh2-view-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.gh2-view-grid .gh2-category-title {
    grid-column: 1 / -1;
}

.gh2-view-grid .gh2-resource-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
}

.gh2-view-grid .gh2-download-btn {
    align-self: flex-end;
}

/* Empty State */
.gh2-empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--gh2-text-light);
}

.gh2-empty-state svg {
    margin-bottom: 1rem;
    opacity: 0.5;
}

.gh2-empty-state p {
    font-size: 1rem;
}

/* Pagination */
.gh2-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--gh2-border);
}

.gh2-page-btn {
    min-width: 40px;
    height: 40px;
    border: 1px solid var(--gh2-border);
    background: var(--gh2-white);
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--gh2-text);
    cursor: pointer;
    transition: all 0.2s;
}

.gh2-page-btn:hover:not(:disabled) {
    border-color: var(--gh2-accent);
    color: var(--gh2-accent);
}

.gh2-page-btn.active {
    background: var(--gh2-primary);
    border-color: var(--gh2-primary);
    color: white;
}

.gh2-page-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.gh2-page-ellipsis {
    padding: 0 0.5rem;
    color: var(--gh2-text-light);
}

/* Badge Variants */
.gh2-badge.success {
    background-color: #ecfdf5;
    color: #059669;
}

.gh2-badge.warning {
    background-color: #fffbeb;
    color: #d97706;
}

.gh2-badge.danger {
    background-color: #fef2f2;
    color: #dc2626;
}

.gh2-badge.info {
    background-color: #eff6ff;
    color: #2563eb;
}

/* Download button as link */
a.gh2-download-btn {
    text-decoration: none;
    color: inherit;
}

.gh2-filter-subheader {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.25);
}
.gh2-sidebar-inner {
    position: sticky;
    top: 2rem;
    background-color: #88af3f;
    padding: 1.5rem;
    border-radius: var(--plugin-radius);
    border: 1px solid var(--gh2-border);
}
/* Sidebar text on green background */
.gh2-sidebar-inner .gh2-filter-header,
.gh2-sidebar-inner .gh2-filter-subheader {
    color: #ffffff;
}

.gh2-sidebar-inner .gh2-filter-btn {
    color: rgba(255, 255, 255, 0.9);
    background: none;
}

.gh2-sidebar-inner .gh2-filter-btn:hover {
    background-color: rgba(255, 255, 255, 0.15);
    color: #ffffff;
}

.gh2-sidebar-inner .gh2-filter-btn.active {
    background-color: #ffffff;
    color: #88af3f;
    font-weight: 600;
    border-left: 3px solid #0a4d44;
    box-shadow: none;
}

.gh2-sidebar-inner .gh2-filter-subheader {
    border-top: 1px solid rgba(255, 255, 255, 0.3);
}

.gh2-sidebar-inner .gh2-help-box {
    border-top: 1px solid rgba(255, 255, 255, 0.3);
}

.gh2-sidebar-inner .gh2-help-box h4 {
    color: #ffffff;
}

.gh2-sidebar-inner .gh2-help-box p {
    color: rgba(255, 255, 255, 0.85);
}

.gh2-sidebar-inner .gh2-contact-link {
    color: #ffffff;
    text-decoration: underline;
}

.gh2-sidebar-inner .gh2-contact-link:hover {
    color: #0a4d44;
}
/* Responsive Adjustments */
@media (max-width: 768px) {
    .gh2-view-controls {
        flex-wrap: wrap;
    }

    .gh2-sort-control {
        width: 100%;
        margin-left: 0;
        margin-top: 0.5rem;
    }

    .gh2-sort-control select {
        width: 100%;
    }

    .gh2-pagination {
        flex-wrap: wrap;
    }
}