/**
 * Custom Guides Manager - Frontend Styles
 * Matching original guides-grid layout from single-guides-new-horizons.php
 */

/* Main Container */
.cgm-guides-container {
    max-width: 100%;
    margin: 0 auto;
}

/* Category Navigation */
.cgm-category-nav {
    margin-bottom: 20px;
}

/* Search Container */
.cgm-search-container {
    margin-bottom: 15px;
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.cgm-search-input {
    flex: 1;
    min-width: 200px;
    padding: 8px 12px;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.cgm-search-input:focus {
    outline: none;
    border-color: #1eae55;
}

.cgm-reset-btn {
    padding: 8px 16px;
    background: #666;
    color: #ffffff;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.cgm-reset-btn:hover {
    background: #555;
}

/* Category Filters */
.cgm-category-filters {
    margin-top: 15px;
}

.cgm-nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.cgm-nav-list li {
    margin: 0;
}

.cgm-category-filter {
    display: inline-block;
    padding: 6px 12px;
    background: #1eae55;
    color: #ffffff;
    border: none;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 3px;
}

.cgm-category-filter:hover {
    background: #2AD56B;
    color: #ffffff;
}

.cgm-category-filter.cgm-selected {
    background: #0f7a3c;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.2);
}

.cgm-category-filter.cgm-selected:hover {
    background: #0d6632;
}

.cgm-count {
    font-size: 12px;
    opacity: 0.9;
    font-weight: 400;
}

/* Category Sections */
.cgm-category-section {
    margin-bottom: 30px;
}

.cgm-category-section:last-child {
    margin-bottom: 0;
}

.cgm-category-header {
    margin-bottom: 15px;
}

.cgm-category-description {
    font-size: 16px;
    color: #666;
    margin: 0;
    line-height: 1.4;
}

/* Guides Grid - Matching original theme styling exactly */
.cgm-category-section .guides-grid {
    display: grid;
    grid-gap: 2vw;
    clear: both;
}

/* Guide Grid Items - Empty rule like original */
.cgm-category-section .guides-grid-item {
    /* Empty rule - matches original implementation */
}

/* Featured images - Match original styling */
.cgm-category-section .guides-grid-item img.featured-image {
    float: left;
    max-width: 100%;
    padding: 0;
}

/* Responsive grid columns - matching original breakpoints */
@media (min-width: 980px) {
    .cgm-category-section .guides-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (min-width: 1210px) {
    .cgm-category-section .guides-grid {
        grid-template-columns: 1fr 1fr 1fr;
    }
}

/* No Categories Message */
.cgm-no-categories {
    text-align: center;
    padding: 40px 20px;
    background: #ffffff;
    border: 1px solid #ddd;
    box-shadow: 0px 2px 5px -1px rgba(176,176,176,0.2);
    color: #666;
    font-size: 16px;
}

/* Focus states for accessibility */
.cgm-category-filter:focus {
    outline: 1px solid #1eae55;
    outline-offset: 2px;
}

.cgm-reset-btn:focus {
    outline: 1px solid #666;
    outline-offset: 2px;
}

/* Mobile responsive navigation */
@media (max-width: 768px) {
    .cgm-category-nav {
        padding: 0;
        margin-bottom: 12px;
    }
    
    .cgm-search-container {
        flex-direction: row;
        align-items: center;
        gap: 8px;
        margin-bottom: 8px;
    }
    
    .cgm-search-input {
        min-width: auto;
        flex: 1;
        padding: 6px 10px;
    }
    
    .cgm-reset-btn {
        padding: 6px 10px;
        font-size: 13px;
        min-width: auto;
        white-space: nowrap;
    }
    
    .cgm-nav-list {
        gap: 4px;
    }
    
    .cgm-category-filter {
        padding: 6px 12px;
        font-size: 13px;
        min-width: auto;
        text-align: center;
    }
}

/* Print styles */
@media print {
    .cgm-category-nav {
        display: none;
    }
}

/* Hidden state for filtered content */
.cgm-category-section[style*="display: none"],
.guides-grid-item[style*="display: none"] {
    display: none !important;
}