/**
 * Archive & Category Pages Layout Styles
 *
 * @package AITools_Hub
 */

/* ==========================================================================
   TOOLS ARCHIVE LAYOUT
   ========================================================================== */

.tools-archive-page {
    background: #F8FBFA;
}

/* Breadcrumb Section */
.breadcrumb-section {
    padding: 20px 0;
    background: white;
    border-bottom: 1px solid #E5EFEA;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.breadcrumb a {
    color: #6B7C78;
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb a:hover {
    color: #2ED06E;
}

.breadcrumb .separator {
    color: #E5EFEA;
}

.breadcrumb .current {
    color: #1F2D2B;
    font-weight: 600;
}

/* Page Header */
.page-header-section {
    padding: 48px 0;
    background: linear-gradient(135deg, #EAF8F1 0%, white 100%);
    text-align: center;
}

.page-title {
    font-size: 42px;
    font-weight: 700;
    color: #1F2D2B;
    margin: 0 0 12px 0;
}

.page-subtitle {
    font-size: 18px;
    color: #6B7C78;
    margin: 0;
}

/* Toolbar Section */
.toolbar-section {
    padding: 20px 0;
    background: white;
    border-bottom: 1px solid #E5EFEA;
    position: sticky;
    top: 80px;
    z-index: 100;
}

.toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.btn-filters {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: white;
    border: 2px solid #E5EFEA;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    color: #1F2D2B;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-filters:hover {
    border-color: #2ED06E;
    color: #2ED06E;
}

.view-toggle {
    display: flex;
    gap: 8px;
}

.view-btn {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border: 2px solid #E5EFEA;
    border-radius: 10px;
    color: #6B7C78;
    cursor: pointer;
    transition: all 0.3s ease;
}

.view-btn:hover {
    border-color: #2ED06E;
    color: #2ED06E;
}

.view-btn.active {
    background: linear-gradient(135deg, #2ED06E 0%, #2ED06E 100%);
    border-color: #2ED06E;
    color: white;
}

.sort-dropdown {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sort-dropdown label {
    font-size: 14px;
    font-weight: 500;
    color: #6B7C78;
}

.sort-dropdown select {
    padding: 10px 16px;
    background: white;
    border: 2px solid #E5EFEA;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    color: #1F2D2B;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.sort-dropdown select:focus {
    outline: none;
    border-color: #2ED06E;
}

/* ==========================================================================
   MAIN LAYOUT - THIS IS THE KEY FIX
   ========================================================================== */

.tools-content-section {
    padding: 32px 0 80px;
}

.tools-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 32px;
    align-items: start;
}

/* Sidebar */
.tools-sidebar {
    position: sticky;
    top: calc(80px + 82px + 24px); /* header + toolbar + gap */
    height: fit-content;
}

/* Main Content Area */
.tools-main {
    min-width: 0; /* Prevents overflow */
}

/* Tools Grid */
.tools-grid {
    display: grid;
    gap: 24px;
    margin-bottom: 32px;
}

.tools-grid.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.tools-grid.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.tools-grid.grid-1 {
    grid-template-columns: 1fr;
}

/* No Tools Found */
.no-tools-found {
    grid-column: 1 / -1;
    text-align: center;
    padding: 64px 24px;
    background: white;
    border-radius: 16px;
    border: 2px dashed #E5EFEA;
}

.no-tools-found i {
    display: block;
    margin: 0 auto 16px;
    color: #E5EFEA;
}

.no-tools-found h3 {
    font-size: 24px;
    color: #1F2D2B;
    margin: 0 0 8px 0;
}

.no-tools-found p {
    font-size: 16px;
    color: #6B7C78;
    margin: 0;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 48px;
}

.page-numbers {
    display: flex;
    align-items: center;
    gap: 8px;
}

.page-numbers a,
.page-numbers span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 12px;
    background: white;
    border: 2px solid #E5EFEA;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    color: #1F2D2B;
    text-decoration: none;
    transition: all 0.3s ease;
}

.page-numbers a:hover {
    border-color: #2ED06E;
    color: #2ED06E;
}

.page-numbers .current {
    background: linear-gradient(135deg, #2ED06E 0%, #2ED06E 100%);
    border-color: #2ED06E;
    color: white;
}

.page-numbers .dots {
    border: none;
    background: none;
    color: #6B7C78;
}

/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */

@media (max-width: 1280px) {
    .tools-layout {
        grid-template-columns: 260px 1fr;
        gap: 24px;
    }
    
    .tools-grid.grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 1024px) {
    .page-title {
        font-size: 36px;
    }
    
    .tools-layout {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .tools-sidebar {
        position: fixed;
        top: 80px;
        left: 0;
        right: 0;
        bottom: 0;
        background: white;
        z-index: 1000;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        overflow-y: auto;
        padding: 24px;
    }
    
    .tools-sidebar.active {
        transform: translateX(0);
    }
    
    .tools-grid.grid-3,
    .tools-grid.grid-2 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .page-title {
        font-size: 32px;
    }
    
    .page-subtitle {
        font-size: 16px;
    }
    
    .toolbar {
        flex-wrap: wrap;
    }
    
    .sort-dropdown {
        width: 100%;
        justify-content: space-between;
    }
    
    .sort-dropdown select {
        flex: 1;
    }
    
    .tools-grid.grid-3,
    .tools-grid.grid-2 {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .pagination {
        flex-wrap: wrap;
    }
}

@media (max-width: 480px) {
    .page-header-section {
        padding: 32px 0;
    }
    
    .page-title {
        font-size: 28px;
    }
    
    .toolbar {
        gap: 12px;
    }
    
    .btn-filters {
        padding: 8px 16px;
        font-size: 13px;
    }
    
    .view-btn {
        width: 38px;
        height: 38px;
    }
}